pede
asked on
Change .text on BeforelabelEdit
Hi, Im trying to change the text of a node (in a TreeView), just before the user starts to edit it. Imagine the text of the node is "Products (100)". When the user edits this nodes text, he's only supposed to edit the "products" text, not the "(100)". That is an autogenerated text I add.
This little sample shows the problem:
private void treeview_BeforeLabelEdit(o bject sender, System.Windows.Forms.NodeL abelEditEv entArgs e)
{
((TreeNode)e.Node).Text = "TEST";
}
The text "TEST" is never shown, the user gets to edit the text that was in the label, before this event. Is there any wordaround for this?
Thanks in advance!
/Pede
This little sample shows the problem:
private void treeview_BeforeLabelEdit(o
{
((TreeNode)e.Node).Text = "TEST";
}
The text "TEST" is never shown, the user gets to edit the text that was in the label, before this event. Is there any wordaround for this?
Thanks in advance!
/Pede
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.