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.