Are you using the latest wxPython? There have been some changes to the
way the editing of labels works. Maybe you could provide a smple.
Yes.
If you check the demo of CustomTreeCtrl in demo.py of wxPython I think
you can understand the following (my problem) in order:
1- My CustomTreeCtrl doesn't have icons (one difference from the
demo);
2- Editing in place allows you to set a label with an empty
string (as in the demo);
3- Because I have no icons in my tree, it's almost impossible to
re-edit an empty label;
4- If the user enters an empty label I show a dialog with a text
entry so I can set the label with the user provided string. This
dialog will only get out of the user way if he enters a non-empty
string. After he enters a valid string I set the label text.This
way I assure every label has a non-empty string.
5- The thingy here is that if the user, when editing the label in
step 2, presses ENTER after leaving the label blank, the node
label is set blank, even after the user inserted a string in my
dialog (at step 4). One nuance I noticed is that if the user
presses the key mouse on the tree, instead of pressing ENTER, my
dialog correctly sets the label.
I hope this provides you with a more clear example. Thanks for you
quick reply.
···
At Fri, 18 Jan 2008 08:21:26 -0600, Rickey, Kyle W wrote:
-Kyle Rickey
-----Original Message-----
From: Norberto Lopes [mailto:collector@mail.telepac.pt]
Sent: Friday, January 18, 2008 5:47 AM
To: wxpython-users@lists.wxwidgets.org
Subject: [wxPython-users] CustomTreeCtrl problemI'm using CustomTreeCtrl, catching the following events:
- EVT_TREE_SEL_CHANGING
- EVT_TREE_SEL_CHANGED
- EVT_TREE_BEGIN_DRAG
- EVT_TREE_END_DRAG
- EVT_TREE_BEGIN_LABEL_EDIT
- EVT_TREE_END_LABEL_EDIT.When I edit an item label in place, I verify if the input is nothing
and if it is nothing, I ask the user for some input. When the user
pressed Enter when editing in place, my change with the new input does
no modification to the label, but when the user instead pressing
Enter, clicks somewhere else, the tree throws an
EVT_TREE_END_LABEL_EDIT and I can change the item label.Can someone give me some insight on what I'm doing wrong?
Thanks in advance,
Norberto Lopes---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org