TreeNode disable Label editing

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hi guys,

I have hooked Insert and Delete keydown on a treenode to Add sub-node on this node and delete the node itself. I can cancel the operation for certain nodes (in effect disable insert and delete for those nodes) in the keydown event.

On the other hand, for editing the node label, there is already  built in the functionality to start editing with a. either F2 or b. two clicks with a short delay between them. And there is the problem. How can I cancel (disable) editing for certain nodes? As soon as they receive F2 or the two delayed clicks they go into editing mode.

Best,
Alex

  • You must to post comments
0
0

Yes, it’s full of spam. 🙂

  • You must to post comments
0
0

Thanks, Luca, that did the trick! I was using BeforeLabelEdit and I was returning if I was on the node I want to cancel edit for, had not seen the e.CancelEdit.

Best,
Alex

PS. Have u checked your spam folder lately? 🙂

  • You must to post comments
0
0

Hi Alex,

Did you try TreeView.OnBeforeLabelEdit? You can set CancelEdit = true to prevent edit mode.

Best,

Luca

  • You must to post comments
Showing 3 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json