LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Allow Drag and Drop from Listbox to Tree, but only if it's child

Solved!
Go to solution

Hello! I'm trying to make some sort of file manager in Tree. What I want is drag and drop "files" from Listbox to Tree, but only as children. How can I do that? Thanks.

0 Kudos
Message 1 of 5
(866 Views)

Why not post the VI?

 

We're not going to recreate what you have, and if we did it wouldn't match what you have.

0 Kudos
Message 2 of 5
(845 Views)

My bad.

Download All
0 Kudos
Message 3 of 5
(838 Views)
Solution
Accepted by SergeyPuzanov

OK, that helps.

 

Sadly, this won't be trivial.

 

You'd have to add a Tree Drop event. That event gives coordinates. You can use the coordinates to find out where the mouse is, by using Point To Row Column method. The event allows you to accept or not accept the drop.

 

Sadly (its all very sad), if you use any drag\drop event, you loose all the build in functionality and you'll have to DIY.

 

If you want feedback while dragging, you can add a Tree Drag Over event. That event also gives coordinates...

0 Kudos
Message 4 of 5
(827 Views)

Ok, I'll try it, thank you!

0 Kudos
Message 5 of 5
(814 Views)