Change TreeNode.Text before editing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi ng,

i have a problem when i try to change the text property of
a TreeNode just before the user is able to edit this property.
Example:
// Label before anything happens...
TreeNode.Text = "TestNode {ShortCut}";
// when user enters the edit mode, i want to remove the ShortCut entry...
TreeNode.Text = "TestNode";
----

I use the BeforeLabelEdit-Event of the TreeView to change the
text like i want, but when the user is able to edit the node the orginal
text is still there.
When i tried to check the Text via a MessageBox the right value (without the
shortcut) appears in the messageBox, but in the end the original value still
appears.

I can switch to EditMode also with the F2 Button and when i change the
text before i get into the BeforeLabelEdit-Eventhandler everything is ok. It
seems
to me that it is to late to change the text in this event.

Does someone has an idea how to handle this problem?
thx,
patrick
 
Back
Top