[wxPython] EVT_SCROLL

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

[wxPython] EVT_SCROLL

Niki Spahiev-3
Platform: wxMSW
wxPython: 2.1b3

I have frame with wxHSCROLL, wxVSCROLL.
Both scrollbars are visible.

I used EVT_SCROLL to capture events without success.
When i use:
        self.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK, self.OnScroll)
I got all events but arg 'event' is 'None'.

I can't compile wx21 myself in order to debug it.
In wx20 there was no SCROLLWIN.

Is there example code using scrollbars?

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] EVT_SCROLL

Robin Dunn
> I have frame with wxHSCROLL, wxVSCROLL.
> Both scrollbars are visible.
>
> I used EVT_SCROLL to capture events without success.
> When i use:
>         self.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK, self.OnScroll)
> I got all events but arg 'event' is 'None'.
>
> I can't compile wx21 myself in order to debug it.
> In wx20 there was no SCROLLWIN.
>

Try using EVT_COMMAND_SCROLL instead.  This is the event generated by plain
scrollbar controls.  The EVT_SCROLLWIN* events are for wxScrolledWindow
only.

--
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



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] EVT_SCROLL

Niki Spahiev-3
In reply to this post by Niki Spahiev-3
EVT_COMMAND_SCROLL wants an id. What is id of H&V-scrollbar in a window?

I think using EVT_SCROLLWIN is just fine, IMHO it only needs wxScrollWinEvent
class in order wxPyConstructObject to sucseed.
When i add 'wxScrollWinEventPtr = wxControlEventPtr' at the end of 'events.py'
it allmost works -> i got 'event' arg in my OnScroll.
If only i had access methods ... ;^)

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] EVT_SCROLL

Robin Dunn
> I think using EVT_SCROLLWIN is just fine, IMHO it only needs
> wxScrollWinEvent class in order wxPyConstructObject to sucseed.
> When i add 'wxScrollWinEventPtr = wxControlEventPtr' at the end
> of 'events.py' it allmost works -> i got 'event' arg in my OnScroll.
> If only i had access methods ... ;^)

Ah, yes.  That class was missing from the last release but has since been
added.  It will be in the next release, which I hope to get done over the
week-end.

--
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