.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.agw.customtreectrl .. highlight:: python .. _wx.lib.agw.customtreectrl.CommandTreeEvent: ========================================================================================================================================== |phoenix_title| **wx.lib.agw.customtreectrl.CommandTreeEvent** ========================================================================================================================================== :class:`CommandTreeEvent` is a special subclassing of :class:`CommandEvent`. .. note:: Not all the accessors make sense for all the events, see the event description for every method in this class. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class CommandTreeEvent:
| |sub_classes| Known Subclasses ============================== :class:`wx.lib.agw.customtreectrl.TreeEvent` | |super_classes| Known Superclasses ================================== :class:`wx.CommandEvent` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.__init__` Default class constructor. :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.GetItem` Gets the item on which the operation was performed or the newly selected :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.GetKeyCode` Returns the virtual key code. ASCII events return normal ASCII values, while :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.GetKeyEvent` Returns the keyboard data (for ``EVT_TREE_KEY_DOWN`` event only). :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.GetLabel` Returns the item text (for ``EVT_TREE_BEGIN_LABEL_EDIT`` and :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.GetOldItem` Returns the previously selected item for ``EVT_TREE_SEL_CHANGED`` and :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.GetPoint` Returns the point where the mouse was when the drag operation started :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.GetToolTip` Returns the tooltip for the item (for ``EVT_TREE_ITEM_GETTOOLTIP`` events). :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.IsEditCancelled` Returns the edit cancel flag (for ``EVT_TREE_BEGIN_LABEL_EDIT`` and :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.SetEditCanceled` Sets the edit cancel flag (for ``EVT_TREE_BEGIN_LABEL_EDIT`` and :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.SetItem` Sets the item on which the operation was performed or the newly selected :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.SetKeyEvent` Sets the keyboard data (for ``EVT_TREE_KEY_DOWN`` event only). :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.SetLabel` Sets the item text (for ``EVT_TREE_BEGIN_LABEL_EDIT`` and :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.SetOldItem` Returns the previously selected item for ``EVT_TREE_SEL_CHANGED`` and :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.SetPoint` Sets the point where the mouse was when the drag operation started :meth:`~wx.lib.agw.customtreectrl.CommandTreeEvent.SetToolTip` Sets the tooltip for the item (for ``EVT_TREE_ITEM_GETTOOLTIP`` events). ================================================================================ ================================================================================ | |api| Class API =============== .. class:: CommandTreeEvent(wx.CommandEvent) :class:`CommandTreeEvent` is a special subclassing of :class:`CommandEvent`. .. note:: Not all the accessors make sense for all the events, see the event description for every method in this class. .. method:: __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! :param integer `evtType`: the event type; :param integer `evtId`: the event identifier; :param `item`: an instance of :class:`GenericTreeItem`; :param integer `evtKey`: a character ordinal; :param `point`: an instance of :class:`wx.Point`; :param string `label`: a :class:`GenericTreeItem` text label. .. method:: 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. :return: An instance of :class:`GenericTreeItem`. .. method:: 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. :return: 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`. .. method:: GetKeyEvent(self) Returns the keyboard data (for ``EVT_TREE_KEY_DOWN`` event only). :return: An instance of :class:`KeyEvent`. .. method:: GetLabel(self) Returns the item text (for ``EVT_TREE_BEGIN_LABEL_EDIT`` and ``EVT_TREE_END_LABEL_EDIT`` events only). :return: A string containing the item text. .. method:: GetOldItem(self) Returns the previously selected item for ``EVT_TREE_SEL_CHANGED`` and ``EVT_TREE_SEL_CHANGING`` events. :return: An instance of :class:`GenericTreeItem`. .. method:: 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. :return: An instance of :class:`wx.Point`. .. method:: GetToolTip(self) Returns the tooltip for the item (for ``EVT_TREE_ITEM_GETTOOLTIP`` events). :return: A string containing the item tooltip. .. method:: IsEditCancelled(self) Returns the edit cancel flag (for ``EVT_TREE_BEGIN_LABEL_EDIT`` and ``EVT_TREE_END_LABEL_EDIT`` events only). :return: ``True`` is the item editing has been cancelled, ``False`` otherwise. .. method:: SetEditCanceled(self, editCancelled) Sets the edit cancel flag (for ``EVT_TREE_BEGIN_LABEL_EDIT`` and ``EVT_TREE_END_LABEL_EDIT`` events only). :param bool `editCancelled`: ``True`` to cancel the editing, ``False`` otherwise. .. method:: 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. :param `item`: an instance of :class:`GenericTreeItem`. .. method:: SetKeyEvent(self, event) Sets the keyboard data (for ``EVT_TREE_KEY_DOWN`` event only). :param `event`: a :class:`CommandTreeEvent` event to be processed. .. method:: SetLabel(self, label) Sets the item text (for ``EVT_TREE_BEGIN_LABEL_EDIT`` and ``EVT_TREE_END_LABEL_EDIT`` events only). :param string `label`: a string containing the new item text. .. method:: SetOldItem(self, item) Returns the previously selected item for ``EVT_TREE_SEL_CHANGED`` and ``EVT_TREE_SEL_CHANGING`` events. :param `item`: an instance of :class:`GenericTreeItem`. .. method:: 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. :param `pt`: an instance of :class:`wx.Point`. .. method:: SetToolTip(self, toolTip) Sets the tooltip for the item (for ``EVT_TREE_ITEM_GETTOOLTIP`` events). :param string `tooltip`: a string representing the item tooltip.