Hello all,
Is it possible to set the start position of a scrollbar, which is enabled by wxWIndow::SetScrollbar(), to any number I want, instead of 0?
How to set wxWIndow::SetScrollbar() start position
Re: How to set wxWIndow::SetScrollbar() start position
For "real" scrolled windows use wxScrolled< T >::Scroll( int x, int y ):
http://docs.wxwidgets.org/trunk/classwx ... d065907f69
There is also wxWindow::ScrollWindow(...), but the docu says:
http://docs.wxwidgets.org/trunk/classwx ... d065907f69
There is also wxWindow::ScrollWindow(...), but the docu says:
Scrolling and scrollbars functions
Note that these methods don't work with native controls which don't use wxWidgets scrolling framework (i.e. don't derive from wxScrolledWindow).
Use the source, Luke!
Re: How to set wxWIndow::SetScrollbar() start position
I'm using wxWidgets 3.0.4 on Windows 10, but the GUI should be cross-platform so I don't want to use any Windows API. The existing code already uses wxWindow::SetScrollbar() to set the scrollbar, so I'm just looking for a quick fix for this problem but sounds like it's pretty complicated.
Re: How to set wxWIndow::SetScrollbar() start position
Can you show some of the code in context, so that we can see what classes are used.The existing code already uses wxWindow::SetScrollbar() to set the scrollbar
If you have existing code that uses wxWindow::SetScrollbar() and it works, then wxWindow::SetScrollPos() might work, too. Did you try it?
Use the source, Luke!