VOOZH about

URL: https://www.geeksforgeeks.org/python/wxpython-editlabel-method-in-wx-treectrl/

⇱ wxPython - EditLabel() method in wx.TreeCtrl - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

wxPython - EditLabel() method in wx.TreeCtrl

Last Updated : 28 Jul, 2020

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:

ParametersTypeDescription
itemwx.TreeItemIdItem that we want to associate editlabel with.

Code Example:

Output:

👁 Image
Comment