wx.lib.agw.customtreectrl.TreeEvent¶
CommandTreeEvent
is a special class for all events associated with tree controls.
Note
Not all accessors make sense for all events, see the event descriptions below.
Class Hierarchy¶
Known Superclasses¶
wx.lib.agw.customtreectrl.CommandTreeEvent
Methods Summary¶
Default class constructor. |
|
This is the opposite of |
|
Returns the actual |
|
Returns |
|
Prevents the change announced by this event from happening. |
Class API¶
- class TreeEvent(CommandTreeEvent)¶
CommandTreeEvent
is a special class for all events associated with tree controls.Note
Not all accessors make sense for all events, see the event descriptions below.
Methods¶
- __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!
- Parameters:
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.
- Allow(self)¶
This is the opposite of
Veto
: it explicitly allows the event to be processed. For most events it is not necessary to call this method as the events are allowed anyhow but some are forbidden by default (this will be mentioned in the corresponding event description).
- GetNotifyEvent(self)¶
Returns the actual
NotifyEvent
.- Returns:
An instance of
NotifyEvent
.
- IsAllowed(self)¶
Returns
True
if the change is allowed (Veto
hasn’t been called) orFalse
otherwise (if it was).
- Veto(self)¶
Prevents the change announced by this event from happening.
Note
It is in general a good idea to notify the user about the reasons for vetoing the change because otherwise the applications behaviour (which just refuses to do what the user wants) might be quite surprising.