Package wx :: Class ScrollEvent
[frames | no frames]

Type ScrollEvent

object --+            
         |            
    Object --+        
             |        
         Event --+    
                 |    
      CommandEvent --+
                     |
                    ScrollEvent


A scroll event holds information about events sent from stand-alone scrollbars and sliders. Note that scrolled windows do not send instnaces of this event class, but send the wx.ScrollWinEvent instead.

Events

EVT_SCROLL Used to bind all scroll events
EVT_SCROLL_TOP scroll-to-top events (minimum position)
EVT_SCROLL_BOTTOM scroll-to-bottom events (maximum position)
EVT_SCROLL_LINEUP line up events
EVT_SCROLL_LINEDOWN line down events
EVT_SCROLL_PAGEUP page up events
EVT_SCROLL_PAGEDOWN page down events
EVT_SCROLL_THUMBTRACK thumbtrack events (frequent events sent as the user drags the 'thumb')
EVT_SCROLL_THUMBRELEASE thumb release events.
EVT_SCROLL_ENDSCROLL End of scrolling

Note

The EVT_SCROLL_THUMBRELEASE event is only emitted when actually dragging the thumb using the mouse and releasing it (This EVT_SCROLL_THUMBRELEASE event is also followed by an EVT_SCROLL_ENDSCROLL event).

The EVT_SCROLL_ENDSCROLL event also occurs when using the keyboard to change the thumb position, and when clicking next to the thumb (In all these cases the EVT_SCROLL_THUMBRELEASE event does not happen).

In short, the EVT_SCROLL_ENDSCROLL event is triggered when scrolling/ moving has finished. The only exception (unfortunately) is that changing the thumb position using the mousewheel does give a EVT_SCROLL_THUMBRELEASE event but NOT an EVT_SCROLL_ENDSCROLL event.


Method Summary
CommandEvent __init__(self, commandType, winid)
This event class contains information about command events, which originate from a variety of simple controls, as well as menus and toolbars.
  __repr__(self)
int GetOrientation(self)
Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of the scrollbar.
int GetPosition(self)
Returns the position of the scrollbar.
  SetOrientation(self, orient)
  SetPosition(self, pos)
    Inherited from CommandEvent
bool Checked(self)
This method can be used with checkbox and menu events: for the checkboxes, the method returns true for a selection event and false for a deselection one.
Event Clone(self)
PyObject GetClientData(self)
Returns the client data object for a listbox or choice selection event, (if any.)
PyObject GetClientObject(self)
Returns the client data object for a listbox or choice selection event, (if any.)
long GetExtraLong(self)
Returns extra information dependant on the event objects type.
long GetInt(self)
Returns the integer identifier corresponding to a listbox, choice or radiobox selection (only if the event was a selection, not a deselection), or a boolean value representing the value of a checkbox.
int GetSelection(self)
Returns item index for a listbox or choice selection event (not valid for a deselection).
String GetString(self)
Returns item string for a listbox or choice selection event (not valid for a deselection).
bool IsChecked(self)
This method can be used with checkbox and menu events: for the checkboxes, the method returns true for a selection event and false for a deselection one.
bool IsSelection(self)
For a listbox or similar event, returns true if it is a selection, false if it is a deselection.
  SetClientData(self, clientData)
Associate the given client data with the item at position n.
  SetClientObject(self, clientData)
Associate the given client data with the item at position n.
  SetExtraLong(self, extraLong)
  SetInt(self, i)
  SetString(self, s)
    Inherited from Event
  __del__(self)
Object GetEventObject(self)
Returns the object (usually a window) associated with the event, if any.
wxEventType GetEventType(self)
Returns the identifier of the given event type, such as wxEVT_COMMAND_BUTTON_CLICKED.
int GetId(self)
Returns the identifier associated with this event, such as a button command id.
bool GetSkipped(self)
Returns true if the event handler should be skipped, false otherwise.
long GetTimestamp(self)
bool IsCommandEvent(self)
Returns true if the event is or is derived from wx.CommandEvent else it returns false.
  ResumePropagation(self, propagationLevel)
Resume the event propagation by restoring the propagation level.
  SetEventObject(self, obj)
Sets the originating object, or in other words, obj is normally the object that is sending the event.
  SetEventType(self, typ)
Sets the specific type of the event.
  SetId(self, Id)
Set's the ID for the event.
  SetTimestamp(self, ts)
bool ShouldPropagate(self)
Test if this event should be propagated to the parent window or not, i.e.
  Skip(self, skip)
Called by an event handler, it controls whether additional event handlers bound to this event will be called after the current event handler returns.
int StopPropagation(self)
Stop the event from propagating to its parent window.
    Inherited from Object
  Destroy(self)
Deletes the C++ object this Python object is a proxy for.
String GetClassName(self)
Returns the class name of the C++ class using wxRTTI.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Method Details

__init__(self, commandType=wxEVT_NULL, winid=0, pos=0, orient=0)
(Constructor)

This event class contains information about command events, which originate from a variety of simple controls, as well as menus and toolbars.

Parameters:
commandType
           (type=wxEventType)

winid
           (type=int)

Returns:
CommandEvent
Overrides:
wx.CommandEvent.__init__ (inherited documentation)

GetOrientation(self)

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

Returns:
int

GetPosition(self)

Returns the position of the scrollbar.

Returns:
int

Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 16:44:50 2007 http://epydoc.sf.net