Reputation: 29
good day,
I have made the scrollbar visible on my panel, but for the life of me I do not know how to capture the scroll events. How is this done? im using versio 2.8.
Even with wxScrolledWindow the scrollbar is visible but how does one get the event and then process it?
I have tried using connect() and no luck. Pleas point me to an example.
Thanks
Upvotes: 1
Views: 2728
Reputation: 22688
Several points:
wxScrolledWindow
is different from using the individual, standalone, wxScrollBar
controls. To capture events for the former, you use wxEVT_SCROLLWIN_XXX
events and the corresponding event macros, while for the latter you use wxEVT_SCROLL_XXX
.wxScrolledWindow
which takes care of scrolling automatically, i.e. you rarely need to catch any events, are you sure you really need to do this?Upvotes: 3