.. include:: headings.inc .. _ScrollWinEvent: ========================================================================================================================================== |phoenix_title| **ScrollWinEvent** ========================================================================================================================================== A scroll event holds information about events sent from scrolling windows. Note that you can use the ``EVT_SCROLLWIN`` macros for intercepting scroll window events from the receiving window. .. _ScrollWinEvent-events: |events| Events Emitted by this Class ===================================== Handlers bound for the following event types will receive a :ref:`ScrollWinEvent` parameter. - EVT_SCROLLWIN: Process all scroll events. - EVT_SCROLLWIN_TOP: Process ``wxEVT_SCROLLWIN_TOP`` scroll-to-top events. - EVT_SCROLLWIN_BOTTOM: Process ``wxEVT_SCROLLWIN_BOTTOM`` scroll-to-bottom events. - EVT_SCROLLWIN_LINEUP: Process ``wxEVT_SCROLLWIN_LINEUP`` line up events. - EVT_SCROLLWIN_LINEDOWN: Process ``wxEVT_SCROLLWIN_LINEDOWN`` line down events. - EVT_SCROLLWIN_PAGEUP: Process ``wxEVT_SCROLLWIN_PAGEUP`` page up events. - EVT_SCROLLWIN_PAGEDOWN: Process ``wxEVT_SCROLLWIN_PAGEDOWN`` page down events. - EVT_SCROLLWIN_THUMBTRACK: Process ``wxEVT_SCROLLWIN_THUMBTRACK`` thumbtrack events (frequent events sent as the user drags the thumbtrack). - EVT_SCROLLWIN_THUMBRELEASE: Process ``wxEVT_SCROLLWIN_THUMBRELEASE`` thumb release events. .. seealso:: :ref:`ScrollEvent`, :ref:`Events and Event Handling ` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **ScrollWinEvent** .. raw:: html

Inheritance diagram of ScrollWinEvent

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~ScrollWinEvent.__init__` Constructor. :meth:`~ScrollWinEvent.GetOrientation` Returns ``HORIZONTAL`` or ``VERTICAL``, depending on the orientation of the scrollbar. :meth:`~ScrollWinEvent.GetPosition` Returns the position of the scrollbar for the thumb track and release events. :meth:`~ScrollWinEvent.SetOrientation` :meth:`~ScrollWinEvent.SetPosition` ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~ScrollWinEvent.Orientation` See :meth:`~ScrollWinEvent.GetOrientation` and :meth:`~ScrollWinEvent.SetOrientation` :attr:`~ScrollWinEvent.Position` See :meth:`~ScrollWinEvent.GetPosition` and :meth:`~ScrollWinEvent.SetPosition` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ScrollWinEvent(Event) A scroll event holds information about events sent from scrolling windows. **Possible constructors**:: ScrollWinEvent(commandType=wxEVT_NULL, pos=0, orientation=0) .. method:: __init__(self, commandType=wxEVT_NULL, pos=0, orientation=0) Constructor. :param `commandType`: :type `commandType`: EventType :param `pos`: :type `pos`: int :param `orientation`: :type `orientation`: int .. method:: GetOrientation(self) Returns ``HORIZONTAL`` or ``VERTICAL``, depending on the orientation of the scrollbar. :rtype: `int` .. todo:: ``HORIZONTAL`` and ``VERTICAL`` should go in their own enum .. method:: GetPosition(self) Returns the position of the scrollbar for the thumb track and release events. Note that this field can't be used for the other events, you need to query the window itself for the current position in that case. :rtype: `int` .. method:: SetOrientation(self, orient) :param `orient`: :type `orient`: int .. method:: SetPosition(self, pos) :param `pos`: :type `pos`: int .. attribute:: Orientation See :meth:`~ScrollWinEvent.GetOrientation` and :meth:`~ScrollWinEvent.SetOrientation` .. attribute:: Position See :meth:`~ScrollWinEvent.GetPosition` and :meth:`~ScrollWinEvent.SetPosition`