Treeview Node, Edit Label event problem

J

Jason

I'm in a position where I need to keep some default nodes
in the tree at all times. Thus, if a user renames a
node, I am creating a replacement in the same
afterlabeledit event.

However, when the new node is created, it's displayed in
the labeledit mode. Pressing enter exits the mode, but I
can't get it to exit programatically, even by setting
e.canceledit(true) or treeview.SelectedNode.EndEdit
(true). I've also tried referencing the newly created
node and directly setting node.EndEdit(True) with no
success.

I'm working under VB.net How can I prevent the newly
created node from appearing in the editlabel mode, or how
can I cancel that mode programmatically within the
afterlabeledit event?

Thanks,

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top