I want to call two functions -- the function that gets called when the
arrows at the top or bottom of a scrollbar is clicked (scroll one line), and
the function that gets called when the empty space in the scrollbar gets
clicked (scroll one page). How do I do this programmatically?
I want to call two functions -- the function that gets called when the
arrows at the top or bottom of a scrollbar is clicked (scroll one line),
and
the function that gets called when the empty space in the scrollbar gets
clicked (scroll one page). How do I do this programmatically?
What kind of scrollbar? The one built-in to a wxScrolledWindow, a
standalone wxScrollbar control, or one built-in to a native control?
For a scrolled window you can use the ScrollLines and ScrollPages methods.
I don't know if that works or not for a standalone scrollbar. For the
native controls it's probably platform and control specific...
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
> I want to call two functions -- the function that gets called when the
> arrows at the top or bottom of a scrollbar is clicked (scroll one line),
and
> the function that gets called when the empty space in the scrollbar gets
> clicked (scroll one page). How do I do this programmatically?What kind of scrollbar? The one built-in to a wxScrolledWindow, a
standalone wxScrollbar control, or one built-in to a native control?For a scrolled window you can use the ScrollLines and ScrollPages methods.
I don't know if that works or not for a standalone scrollbar. For the
native controls it's probably platform and control specific...
Unfortunately, It was a wxTextCtrl that I was wanting to do this on, and as
the documentation says:
"This function is currently only implemented under MSW and wxTextCtrl under
wxGTK (it also works for wxScrolledWindow derived classes under all
platforms)."
Does this mean that I need to start with a wxScrolledWindow, and add to it
all the functionality from wxTextCtrl that I want?
Does this mean that I need to start with a wxScrolledWindow, and add to it
all the functionality from wxTextCtrl that I want?
Probably. You may want to take a look at wxEditor in
wxPython/lib/editor/*.py as it is alread done, and derives from
wxScrolledWindow.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!