A tree event holds information about events associated with TreeCtrl objects.
To process input from a tree control, use these event handler macros to direct input to member functions that take a TreeEvent argument.
Handlers bound for the following event types will receive a TreeEvent parameter.
See also
__init__ | Constructor, used by wxWidgets itself only. |
GetItem | Returns the item (valid for all events). |
GetKeyCode | Returns the key code if the event is a key event. |
GetKeyEvent | Returns the key event for EVT_TREE_KEY_DOWN events. |
GetLabel | Returns the label if the event is a begin or end edit label event. |
GetOldItem | Returns the old item index (valid for EVT_TREE_ITEM_CHANGING and EVT_TREE_ITEM_CHANGED events). |
GetPoint | Returns the position of the mouse pointer if the event is a drag or menu-context event. |
IsEditCancelled | Returns True if the label edit was cancelled. |
SetToolTip | Set the tooltip for the item (valid for EVT_TREE_ITEM_GETTOOLTIP events). |
Item | See GetItem |
KeyCode | See GetKeyCode |
KeyEvent | See GetKeyEvent |
Label | See GetLabel |
OldItem | See GetOldItem |
Point | See GetPoint |
A tree event holds information about events associated with TreeCtrl objects.
Possible constructors:
TreeEvent(commandType, tree, item=TreeItemId())
Constructor, used by wxWidgets itself only.
Parameters: |
|
---|
Returns the item (valid for all events).
Return type: | TreeItemId |
---|
Returns the key code if the event is a key event.
Use GetKeyEvent to get the values of the modifier keys for this event (i.e. Shift or Ctrl).
Return type: | int |
---|
Returns the label if the event is a begin or end edit label event.
Return type: | string |
---|
Returns the old item index (valid for EVT_TREE_ITEM_CHANGING and EVT_TREE_ITEM_CHANGED events).
Return type: | TreeItemId |
---|
Returns the position of the mouse pointer if the event is a drag or menu-context event.
In both cases the position is in client coordinates - i.e. relative to the TreeCtrl window (so that you can pass it directly to e.g. Window.PopupMenu ).
Return type: | Point |
---|
Returns True if the label edit was cancelled.
This should be called from within an EVT_TREE_END_LABEL_EDIT handler.
Return type: | bool |
---|
Set the tooltip for the item (valid for EVT_TREE_ITEM_GETTOOLTIP events).
Windows only.
Parameters: | tooltip (string) – |
---|
See GetKeyCode
See GetKeyEvent
See GetOldItem