LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree Control Drag & Drop in LabVIEW 8

It seems like the 2009 'Drag and drop' features have a 'Accepted' status on the drop event.

Setting this to true will delete the source, after the event has finished!

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 11 of 20
(1,656 Views)

 

Where can I get the info if it was dropped in between two or onto another item?

0 Kudos
Message 12 of 20
(1,593 Views)

I got stuck at the same point where SegFault got stuck 5 Years. I can't programmatically figure out if I drop in between or onto another item.

However, not being able to do so makes handling drop events by the user rather limited. Apart from that, I still think that there should be an option to keep the Labview internal handling of drop events.

 

Anybody got a workaround?

0 Kudos
Message 13 of 20
(1,077 Views)

Hi, i found a way to drop between to elements in the tree control, im sure is not the best way, but it is a way. Sorry for my bad english
*Create an event case for the tree control "drop"
*Use an invoke node linked to a tree control "Point to row column"
*Use the coords that givyou the event and wire it to the invoke node in "point" (With that you are going to "get" in wich element you dropped your dragged element)
*Use property node linked to a tree control "value" (with that you are going to "get" wich element you are dragging)
*Filter any thing you need with that data in that event case
*Optional: you can get "child text" with "active item tag" then "Activecolnum" then "cellstring"
*Here the tricky part: Use "activeitemtag" and active your "dropped element" then get "Height" and "ActiveCellPos/Top"
*Watch Imagen1 to see the operations you need to do
*Then all those data put it in a shift register
*then create an event case "Drag Ended"
*You can see the image 2 to get an idea how to drop elements between

Hope this helps,

Download All
0 Kudos
Message 14 of 20
(925 Views)

I forgot to add the this othe case

0 Kudos
Message 15 of 20
(920 Views)

@Cordova_Mr wrote:

I forgot to add the this othe case


 

I'd say you forgot everything.  Nothing you posted is executable code.  On a text based language forum you wouldn't take screenshots of notepad and attach them you'd attach the actual code.  Either attach a VI, or attach a snippet which is an image with executable code in it.

 

http://www.ni.com/tutorial/9330/en/

0 Kudos
Message 16 of 20
(892 Views)

Well i was just trying to show the way you can do it, i have that code in my vi, but i cant share it, and is working, and the full idea of that, is embodied in those images, you can reproduce it. maybe later i can reproduce that in some vi example, but with those comments i get tempted not to help more

0 Kudos
Message 17 of 20
(876 Views)

This is the Test Vi

Message 18 of 20
(828 Views)

@Cordova_Mr wrote:

but with those comments i get tempted not to help more


Not trying to be mean, but I was trying to be stern.  And hopefully in the future you (and others) will remember pictures of code are barely useful, by not telling the whole story of what is going on.  Thanks for posting your code.

0 Kudos
Message 19 of 20
(810 Views)

Once the Drag Over event is used, the drop between line disappears...

 

See Why-Does-Adding-an-Event-Change-Drag-And-Drop-Functionality for a more complete narrative.

0 Kudos
Message 20 of 20
(30 Views)