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.Appen dItem(self.root ,'New Item Node',-1,-1)
EVT_TREE_END_LA BEL_EDIT(self.t ree, treeID, self.OnEndEdit)
---------
But when I respond to the EVT_TREE_END_LA BEL_EDIT event, I don't get the
new label when you change it:
The event handler:
-------------
def OnEndEdit(self, event):
item=event.GetI tem()
s = self.tree.GetIt emText(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?
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.Appen dItem(self.root ,'New Item Node',-1,-1)
EVT_TREE_END_LA BEL_EDIT(self.t ree, treeID, self.OnEndEdit)
---------
But when I respond to the EVT_TREE_END_LA BEL_EDIT event, I don't get the
new label when you change it:
The event handler:
-------------
def OnEndEdit(self, event):
item=event.GetI tem()
s = self.tree.GetIt emText(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?
Comment