Question Treeview - allow edit only some part of whole word in selectednode.text (label)

MahamidShaft

New member
Joined
Jan 27, 2010
Messages
3
Programming Experience
Beginner
Hello.

I need some help when i edit text in selected node in treeview.

Let say, that i'd like to edit node text "E1 PARENT, E2 PARENT....", or. "P1 Child, P2 Child.......". This task is simple, but let go further.

When i click node "P1 Child", my goal is to allow edit only second part of node text "Child", and not "P1".
Is it possible to do something like that. When i click node text (label) (P1 Child), only text "Child" is in editing mode. Text "P1" will erase/hide in edit mode, but will reappear after editing.

I probably need to use treeview (before and after) label edit ? How ? Any code ?

Thank you for your help.

treeview.jpg
 
I haven't test this theory but I think it should work. There are BeforeLabelEdit and AfterLabelEdit events so I would expect that you would be able to remove the uneditable portion of the text on the BeforeLabelEdit event and then restore it on the AfterLabelEdit event.
 
Back
Top