![]() |
VOOZH | about |
In this article we are going to learn about EditLabel() method associated with wx.TreeCtrl class of wxPython. Starts editing the label of the given item.
This function generates a EVT_TREE_BEGIN_LABEL_EDIT event which can be vetoed so that no text control will appear for in-place editing.
If the user changed the label (i.e. s/he does not press ESC or leave the text control without changes, a EVT_TREE_END_LABEL_EDIT event will be sent which can be vetoed as well.
Syntax: wx.TreeCtrl.EditLabel(self, item)
Parameters:
Parameters Type Description item wx.TreeItemId Item that we want to associate editlabel with.
Code Example:
Output:
👁 Image