[wxPython] wxListCtrl::ScrollList doc err

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] wxListCtrl::ScrollList doc err

Niki Spahiev-3
wxPython 2.1b3/NT4.0

I need to scroll wxListCtrl 'i' lines in report mode. Dos says that this is
done automaticaly, but in reality i ought to send exact number of pixels. This
is the same in win32 SDK help.

Today i wrote small code to address this:

### cut ###
    def Scroll( self, i ):
        rect = self.GetItemRect( 0 )
        print rect, rect.x, rect.y, rect.width, rect.height
        a = rect.y
        rect = self.GetItemRect( 1 )
        print rect, rect.x, rect.y, rect.width, rect.height
        self.ScrollList( 0, i * (rect.y-a) )
### cut ###

Output from print is:
(160, 37, <NULL>, <NULL>) 0 20 160 37
(160, 54, <NULL>, <NULL>) 0 37 160 54
Strange, isn't it ?

Niki Spahiev

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxListCtrl::ScrollList doc err

Robin Dunn
> Output from print is:
> (160, 37, <NULL>, <NULL>) 0 20 160 37
> (160, 54, <NULL>, <NULL>) 0 37 160 54
> Strange, isn't it ?

Looks like a simple cut and paste bug in how wxRects are converted to
strings.  I'll fix it.

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users