LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

tree drag and drop

Is it possible to copy items between two tree controls ?.When I drag item on the other tree I don't catch any event .
0 Kudos
Message 1 of 6
(4,011 Views)
The drag and drop events don't work between controls, only within the context of one tree control. There is a function for copying items from one tree control to another (CopyTreeItem). So, you couldn't do drag and drop to copy, but you could easily set up a button that would copy a selected item from one tree to another. One idea would be to have two trees, with two buttons between them. One with a >>> label, and one with a <<< label. The two buttons would transfer items back and forth between the trees.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 6
(4,011 Views)
Thank you.I'm a little disappointed because the treeview control is very useful but limited.
0 Kudos
Message 3 of 6
(4,011 Views)
Actually, I think you will find that the tree control is very full-featured, more so than most any other tree control available in other development environments. What is limited is CVI's support for drag and drop events between controls. We have not yet added that to any controls in CVI, and the tree control is actually the first control to have drag and drop events inside the control.

If you have other functionality that you are looking for in the tree control that isn't there other than drag-and-drop between controls, let us know. We could likely find a way to do what you need, or at least make sure we get it on the list of requested future enhancements.

Chris
0 Kudos
Message 4 of 6
(4,011 Views)
Yes,I agree with you : the tree control is very powerfull.Thank you for your answer.
0 Kudos
Message 5 of 6
(4,011 Views)

If both tree controls have Allow Drag Drop Outside Control set to true, you can drag an item from one to the other control.

 

Of course, if you want to apply any rules with events, you'll loose all the standard functionality, and will never be able to get it back...

0 Kudos
Message 6 of 6
(2,049 Views)