A scroll event holds information about events sent from scrollbars and scrolling windows.
Derived from
wxCommandEvent
wxEvent
wxObject
Include files
<wx/event.h>
Event table macros
To process a scroll event, use these event handler macros to direct input to member functions that take a wxScrollEvent argument. You can use EVT_COMMAND_SCROLL... macros with window IDs for when intercepting scroll events from controls, or EVT_SCROLL... macros without window IDs for intercepting scroll events from the receiving window.
EVT_SCROLL(func) | Process all scroll events. |
EVT_SCROLL_TOP(func) | Process wxEVT_SCROLL_TOP scroll-to-top events. |
EVT_SCROLL_BOTTOM(func) | Process wxEVT_SCROLL_TOP scroll-to-bottom events. |
EVT_SCROLL_LINEUP(func) | Process wxEVT_SCROLL_LINEUP line up events. |
EVT_SCROLL_LINEDOWN(func) | Process wxEVT_SCROLL_LINEDOWN line down events. |
EVT_SCROLL_PAGEUP(func) | Process wxEVT_SCROLL_PAGEUP page up events. |
EVT_SCROLL_PAGEDOWN(func) | Process wxEVT_SCROLL_PAGEDOWN page down events. |
EVT_SCROLL_THUMBTRACK(func) | Process wxEVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumtrack). |
EVT_COMMAND_SCROLL(id, func) | Process all scroll events. |
EVT_COMMAND_SCROLL_TOP(id, func) | Process wxEVT_SCROLL_TOP scroll-to-top events. |
EVT_COMMAND_SCROLL_BOTTOM(id, func) | Process wxEVT_SCROLL_TOP scroll-to-bottom events. |
EVT_COMMAND_SCROLL_LINEUP(id, func) | Process wxEVT_SCROLL_LINEUP line up events. |
EVT_COMMAND_SCROLL_LINEDOWN(id, func) | Process wxEVT_SCROLL_LINEDOWN line down events. |
EVT_COMMAND_SCROLL_PAGEUP(id, func) | Process wxEVT_SCROLL_PAGEUP page up events. |
EVT_COMMAND_SCROLL_PAGEDOWN(id, func) | Process wxEVT_SCROLL_PAGEDOWN page down events. |
EVT_COMMAND_SCROLL_THUMBTRACK(id, func) | Process wxEVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumtrack). |
Note that unless specifying a scroll control identifier, you will need to test for scrollbar orientation with wxScrollEvent::GetOrientation, since horizontal and vertical scroll events are processed using the same event handler.
See also
wxWindow::OnScroll, wxScrollBar, Event handling overview
Members
wxScrollEvent::wxScrollEvent
wxScrollEvent::GetOrientation
wxScrollEvent::GetPosition
wxScrollEvent(WXTYPE commandType = 0, int id = 0, int pos = 0, int orientation = 0)
Constructor.
int GetOrientation() const
Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar.
int GetPosition() const
Returns the position of the scrollbar.