Auto-scrolling with wxScrolled when user is making a selection

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
beneficii
Earned some good credits
Earned some good credits
Posts: 111
Joined: Fri Nov 27, 2009 2:49 am

Auto-scrolling with wxScrolled when user is making a selection

Post by beneficii » Tue May 01, 2018 9:45 am

What would be the best way of going about implementing auto-scrolling in wxScrolled<wxWindow>, when you are holding down the mouse button and move the cursor past the edge of the window? This would be for the purpose of allowing people to do selections (here, of tiles) that are greater than the visible client size.

User avatar
doublemax
Moderator
Moderator
Posts: 13594
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Auto-scrolling with wxScrolled when user is making a selection

Post by doublemax » Tue May 01, 2018 10:09 am

It's already built it. It will be triggered if the mouse is captured on that window and the mouse leaves the client area. Unfortunately it only works in one direction at a time, horizontal or vertical, not both.
Use the source, Luke!

Post Reply