TreeNode End of Editing Event

StvB mesteve_bpleaseremovethis at hotmail.com
Mon Nov 15 21:20:07 EST 2004


Hi,
  I just started implementing adding a new node to an existing tree.

In these statements, I add the node itself and  attach the
        "end of editing" event handler to the event
--------
id = self.tree.AppendItem(self.root,'New Item Node',-1,-1)
EVT_TREE_END_LABEL_EDIT(self.tree, treeID, self.OnEndEdit)
---------
 But when I respond to the EVT_TREE_END_LABEL_EDIT event, I don't get the 
new label when you change it:

 The event handler:
-------------
  def OnEndEdit(self,event):
        item=event.GetItem()
        s = self.tree.GetItemText(item)  # for debugging

------------

The 's' variable shows the original label (set above) which is 'New Item 
Node'.  Should it not show the new text after entering and then press Enter 
key?


Am I going about this the wrong way?










More information about the Python-list mailing list