************** wx.ScrollEvent ************** Inheritance diagram for `wx.ScrollEvent`: | .. inheritance-diagram:: wx.ScrollEvent | Description =========== A scroll event holds information about events sent from stand-alone scrollbars and sliders. .. note:: Note that starting from wxWidgets 2.1, scrolled windows send the `wx.ScrollWinEvent `_ which does not derive from `wx.CommandEvent `_, but from `wx.Event `_ directly - don't confuse these two kinds of events and use the event table macros mentioned below only for the scrollbar-like controls. .. seealso:: `wx.ScrollBar <../Widgets/wx.ScrollBar.html>`_, `wx.Slider <../Widgets/wx.Slider.html>`_, `wx.SpinButton <../Widgets/wx.SpinButton.html>`_, `wx.ScrollWinEvent `_ Derived From ^^^^^^^^^^^^^ * `wx.CommandEvent `_ * `wx.Event `_ * `wx.Object <../Widgets/wx.Object.html>`_ Remarks ^^^^^^^ Note that unless specifying a scroll control identifier, you will need to test for scrollbar orientation with `GetOrientation <#GetOrientation>`_, since horizontal and vertical scroll events are processed using the same event handler. Event Handling ^^^^^^^^^^^^^^ To process a scroll event, use these event handler macros to direct input to member functions that take a `wx.ScrollEvent` 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 -- except for this, the macros behave exactly the same. ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_SCROLL(func) Process all scroll events. wx.EVT_SCROLL_TOP(func) Process ``wx.wxEVT_SCROLL_TOP`` scroll-to-top events (minimum position). wx.EVT_SCROLL_BOTTOM(func) Process ``wx.wxEVT_SCROLL_BOTTOM`` scroll-to-bottom events (maximum position). wx.EVT_SCROLL_LINEUP(func) Process ``wx.wxEVT_SCROLL_LINEUP`` line up events. wx.EVT_SCROLL_LINEDOWN(func) Process ``wx.wxEVT_SCROLL_LINEDOWN`` line down events. wx.EVT_SCROLL_PAGEUP(func) Process ``wx.wxEVT_SCROLL_PAGEUP`` page up events. wx.EVT_SCROLL_PAGEDOWN(func) Process ``wx.wxEVT_SCROLL_PAGEDOWN`` page down events. wx.EVT_SCROLL_THUMBTRACK(func) Process ``wx.wxEVT_SCROLL_THUMBTRACK`` thumbtrack events (frequent events sent as the user drags the thumbtrack). wx.EVT_SCROLL_THUMBRELEASE(func) Process ``wx.wxEVT_SCROLL_THUMBRELEASE`` thumb release events. wx.EVT_SCROLL_CHANGED(func) Process ``wx.wxEVT_SCROLL_CHANGED`` end of scrolling events (MSW only). wx.EVT_COMMAND_SCROLL(id, func) Process all scroll events. wx.EVT_COMMAND_SCROLL_TOP(id, func) Process ``wx.wxEVT_SCROLL_TOP`` scroll-to-top events (minimum position). wx.EVT_COMMAND_SCROLL_BOTTOM(id, func) Process ``wx.wxEVT_SCROLL_BOTTOM`` scroll-to-bottom events (maximum position). wx.EVT_COMMAND_SCROLL_LINEUP(id, func) Process ``wx.wxEVT_SCROLL_LINEUP`` line up events. wx.EVT_COMMAND_SCROLL_LINEDOWN(id, func) Process ``wx.wxEVT_SCROLL_LINEDOWN`` line down events. wx.EVT_COMMAND_SCROLL_PAGEUP(id, func) Process ``wx.wxEVT_SCROLL_PAGEUP`` page up events. wx.EVT_COMMAND_SCROLL_PAGEDOWN(id, func) Process ``wx.wxEVT_SCROLL_PAGEDOWN`` page down events. wx.EVT_COMMAND_SCROLL_THUMBTRACK(id, func) Process ``wx.wxEVT_SCROLL_THUMBTRACK`` thumbtrack events (frequent events sent as the user drags the thumbtrack). wx.EVT_COMMAND_SCROLL_THUMBRELEASE(func) Process ``wx.wxEVT_SCROLL_THUMBRELEASE`` thumb release events. wx.EVT_COMMAND_SCROLL_CHANGED(func) Process ``wx.wxEVT_SCROLL_CHANGED`` end of scrolling events (MSW only). ================================================== ================================================== Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetOrientation <#GetOrientation>`_ * `GetPosition <#GetPosition>`_ * `SetOrientation <#SetOrientation>`_ * `SetPosition <#SetPosition>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `Orientation <#Orientation>`_ * `Position <#Position>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(commandType=wx.wxEVT_NULL, winid=0, pos=0, orient=0) Constructor. **Parameters:** * `commandType` (eventtype) * `winid` (int) * `pos` (int) * `orient` (int) | **Returns:** `wx.ScrollEvent `_ -------- .. method:: GetOrientation() Returns ``wx.HORIZONTAL`` or ``wx.VERTICAL``, depending on the orientation of the scrollbar. | **Returns:** `int` -------- .. method:: GetPosition() Returns the position of the scrollbar. | **Returns:** `int` -------- .. method:: SetOrientation(orient) | **Parameters:** * `orient` (int) -------- .. method:: SetPosition(pos) | **Parameters:** * `pos` (int) -------- Properties ^^^^^^^^^^ .. attribute:: Orientation See `GetOrientation <#GetOrientation>`_ and `SetOrientation <#SetOrientation>`_ .. attribute:: Position See `GetPosition <#GetPosition>`_ and `SetPosition <#SetPosition>`_