CommandTreeEvent
is a special subclassing of CommandEvent
.
Note
Not all the accessors make sense for all the events, see the event description for every method in this class.
wx.lib.agw.customtreectrl.TreeEvent
Default class constructor. |
|
Gets the item on which the operation was performed or the newly selected |
|
Returns the virtual key code. ASCII events return normal ASCII values, while |
|
Returns the keyboard data (for |
|
Returns the item text (for |
|
Returns the previously selected item for |
|
Returns the point where the mouse was when the drag operation started |
|
Returns the tooltip for the item (for |
|
Returns the edit cancel flag (for |
|
Sets the edit cancel flag (for |
|
Sets the item on which the operation was performed or the newly selected |
|
Sets the keyboard data (for |
|
Sets the item text (for |
|
Returns the previously selected item for |
|
Sets the point where the mouse was when the drag operation started |
|
Sets the tooltip for the item (for |
CommandTreeEvent
(wx.CommandEvent)¶CommandTreeEvent
is a special subclassing of CommandEvent
.
Note
Not all the accessors make sense for all the events, see the event description for every method in this class.
__init__
(self, evtType, evtId, item=None, evtKey=None, point=None, label=None, **kwargs)¶Default class constructor. For internal use: do not call it in your code!
evtType (integer) – the event type;
evtId (integer) – the event identifier;
item – an instance of GenericTreeItem
;
evtKey (integer) – a character ordinal;
point – an instance of wx.Point
;
label (string) – a GenericTreeItem
text label.
GetItem
(self)¶Gets the item on which the operation was performed or the newly selected
item for EVT_TREE_SEL_CHANGED
and EVT_TREE_SEL_CHANGING
events.
An instance of GenericTreeItem
.
GetKeyCode
(self)¶Returns the virtual key code. ASCII events return normal ASCII values, while
non-ASCII events return values such as wx.WXK_LEFT
for the left cursor key.
This method is for EVT_TREE_KEY_DOWN
events only.
An integer representing the virtual key code.
Note
In Unicode build, the returned value is meaningful only if the user entered a character that can be represented in current locale’s default charset. You can obtain the corresponding Unicode character using GetUnicodeKey.
GetKeyEvent
(self)¶Returns the keyboard data (for EVT_TREE_KEY_DOWN
event only).
An instance of KeyEvent
.
GetLabel
(self)¶Returns the item text (for EVT_TREE_BEGIN_LABEL_EDIT
and
EVT_TREE_END_LABEL_EDIT
events only).
A string containing the item text.
GetOldItem
(self)¶Returns the previously selected item for EVT_TREE_SEL_CHANGED
and
EVT_TREE_SEL_CHANGING
events.
An instance of GenericTreeItem
.
GetPoint
(self)¶Returns the point where the mouse was when the drag operation started
(for EVT_TREE_BEGIN_DRAG
and EVT_TREE_BEGIN_RDRAG
events only)
or the click position.
An instance of wx.Point
.
GetToolTip
(self)¶Returns the tooltip for the item (for EVT_TREE_ITEM_GETTOOLTIP
events).
A string containing the item tooltip.
IsEditCancelled
(self)¶Returns the edit cancel flag (for EVT_TREE_BEGIN_LABEL_EDIT
and
EVT_TREE_END_LABEL_EDIT
events only).
True
is the item editing has been cancelled, False
otherwise.
SetEditCanceled
(self, editCancelled)¶Sets the edit cancel flag (for EVT_TREE_BEGIN_LABEL_EDIT
and
EVT_TREE_END_LABEL_EDIT
events only).
editCancelled (bool) – True
to cancel the editing, False
otherwise.
SetItem
(self, item)¶Sets the item on which the operation was performed or the newly selected
item for EVT_TREE_SEL_CHANGED
and EVT_TREE_SEL_CHANGING
events.
item – an instance of GenericTreeItem
.
SetKeyEvent
(self, event)¶Sets the keyboard data (for EVT_TREE_KEY_DOWN
event only).
event – a CommandTreeEvent
event to be processed.
SetLabel
(self, label)¶Sets the item text (for EVT_TREE_BEGIN_LABEL_EDIT
and
EVT_TREE_END_LABEL_EDIT
events only).
label (string) – a string containing the new item text.
SetOldItem
(self, item)¶Returns the previously selected item for EVT_TREE_SEL_CHANGED
and
EVT_TREE_SEL_CHANGING
events.
item – an instance of GenericTreeItem
.
SetPoint
(self, pt)¶Sets the point where the mouse was when the drag operation started
(for EVT_TREE_BEGIN_DRAG
and EVT_TREE_BEGIN_RDRAG
events only)
or the click position.
pt – an instance of wx.Point
.
SetToolTip
(self, toolTip)¶Sets the tooltip for the item (for EVT_TREE_ITEM_GETTOOLTIP
events).
tooltip (string) – a string representing the item tooltip.