[wxPython-users] A problem with wxTreeCtrl.GetItemText()
Andrea Gavana
andrea.gavana at gmail.com
Mon Apr 2 13:34:27 PDT 2007
Hi Eric,
On 4/2/07, Eric Coetzee wrote:
> I was hoping to use use GetItemText() to read the new label of the tree item
> after the user has edited it.
> So in the EVT_TREE_END_LABEL_EDIT handler i call this method, but the old
> label ( i.e. before the edit) is returned.
> Is there something else i have to do or coud this be a bug?
I believe you should use something like:
def OnEndEdit(self, event):
if event.IsEditCancelled():
return
itemText = event.GetLabel()
And you're done :-D
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
More information about the wxpython-users
mailing list