Table Of Contents

Previous topic

ScrollBar

Next topic

ScrollWinEvent

This Page

phoenix_title ScrollEvent

A scroll event holds information about events sent from stand-alone scrollbars (see ScrollBar) and sliders (see Slider).

Note that scrolled windows send the ScrollWinEvent which does not derive from CommandEvent, but from Event directly - don’t confuse these two kinds of events and use the event table macros mentioned below only for the scrollbar-like controls.

phoenix_title The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED

events Events Emitted by this Class

Handlers bound for the following event types will receive a ScrollEvent parameter.

  • EVT_SCROLL: Process all scroll events.
  • EVT_SCROLL_TOP: Process wxEVT_SCROLL_TOP scroll-to-top events (minimum position).
  • EVT_SCROLL_BOTTOM: Process wxEVT_SCROLL_BOTTOM scroll-to-bottom events (maximum position).
  • EVT_SCROLL_LINEUP: Process wxEVT_SCROLL_LINEUP line up events.
  • EVT_SCROLL_LINEDOWN: Process wxEVT_SCROLL_LINEDOWN line down events.
  • EVT_SCROLL_PAGEUP: Process wxEVT_SCROLL_PAGEUP page up events.
  • EVT_SCROLL_PAGEDOWN: Process wxEVT_SCROLL_PAGEDOWN page down events.
  • EVT_SCROLL_THUMBTRACK: Process wxEVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumbtrack).
  • EVT_SCROLL_THUMBRELEASE: Process wxEVT_SCROLL_THUMBRELEASE thumb release events.
  • EVT_SCROLL_CHANGED: Process wxEVT_SCROLL_CHANGED end of scrolling events (MSW only).
  • EVT_COMMAND_SCROLL: Process all scroll events.
  • EVT_COMMAND_SCROLL_TOP: Process wxEVT_SCROLL_TOP scroll-to-top events (minimum position).
  • EVT_COMMAND_SCROLL_BOTTOM: Process wxEVT_SCROLL_BOTTOM scroll-to-bottom events (maximum position).
  • EVT_COMMAND_SCROLL_LINEUP: Process wxEVT_SCROLL_LINEUP line up events.
  • EVT_COMMAND_SCROLL_LINEDOWN: Process wxEVT_SCROLL_LINEDOWN line down events.
  • EVT_COMMAND_SCROLL_PAGEUP: Process wxEVT_SCROLL_PAGEUP page up events.
  • EVT_COMMAND_SCROLL_PAGEDOWN: Process wxEVT_SCROLL_PAGEDOWN page down events.
  • EVT_COMMAND_SCROLL_THUMBTRACK: Process wxEVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumbtrack).
  • EVT_COMMAND_SCROLL_THUMBRELEASE: Process wxEVT_SCROLL_THUMBRELEASE thumb release events.
  • EVT_COMMAND_SCROLL_CHANGED: Process wxEVT_SCROLL_CHANGED end of scrolling events (MSW only).

Note

Note that unless specifying a scroll control identifier, you will need to test for scrollbar orientation with ScrollEvent.GetOrientation , since horizontal and vertical scroll events are processed using the same event handler.


class_hierarchy Inheritance Diagram

Inheritance diagram for class ScrollEvent

Inheritance diagram of ScrollEvent


method_summary Methods Summary

__init__ Constructor.
GetOrientation Returns HORIZONTAL or VERTICAL, depending on the orientation of the scrollbar.
GetPosition Returns the position of the scrollbar.
SetOrientation  
SetPosition  

api Class API



class ScrollEvent(CommandEvent)

A scroll event holds information about events sent from stand-alone scrollbars (see ScrollBar) and sliders (see Slider).

Possible constructors:

ScrollEvent(commandType=wxEVT_NULL, id=0, pos=0, orientation=0)

Methods



__init__(self, commandType=wxEVT_NULL, id=0, pos=0, orientation=0)

Constructor.

Parameters:
  • commandType (EventType) –
  • id (int) –
  • pos (int) –
  • orientation (int) –


GetOrientation(self)

Returns HORIZONTAL or VERTICAL, depending on the orientation of the scrollbar.

Return type:int


GetPosition(self)

Returns the position of the scrollbar.

Return type:int


SetOrientation(self, orient)
Parameters:orient (int) –


SetPosition(self, pos)
Parameters:pos (int) –

Properties



Orientation

See GetOrientation and SetOrientation



Position

See GetPosition and SetPosition