How to code...
Posted: Tue Nov 03, 2009 3:33 pm
Hello!
Just started with TeeTree and need some guidance how to approach the following problems:
I want to use drag and drop between nodes, but I have to be able to control wich nodes are allowed to be dropped on wich nodes! When I enable the DragAndDrop.Automatic it permitts drop on any node without fiering the OnDragOver event. Do I have to manage it all manually, and if, do you have any sample code?
In the TTree.OnClickShape event i want to add children to the clicked node and make the first one of the added children the "selected" node. I tried with TreeNodeShape.Selected := True; (TreeNodeShape beeing the added child) but it's still the clicked node that becomes the selected one.
Regards, Mikael
Just started with TeeTree and need some guidance how to approach the following problems:
I want to use drag and drop between nodes, but I have to be able to control wich nodes are allowed to be dropped on wich nodes! When I enable the DragAndDrop.Automatic it permitts drop on any node without fiering the OnDragOver event. Do I have to manage it all manually, and if, do you have any sample code?
In the TTree.OnClickShape event i want to add children to the clicked node and make the first one of the added children the "selected" node. I tried with TreeNodeShape.Selected := True; (TreeNodeShape beeing the added child) but it's still the clicked node that becomes the selected one.
Regards, Mikael