cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

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
Mensaje 11 de 20
4.137 Vistas

 

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

0 kudos
Mensaje 12 de 20
4.074 Vistas

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
Mensaje 13 de 20
3.558 Vistas

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,

Descargar todos
0 kudos
Mensaje 14 de 20
3.406 Vistas

I forgot to add the this othe case

0 kudos
Mensaje 15 de 20
3.401 Vistas

@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
Mensaje 16 de 20
3.373 Vistas

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
Mensaje 17 de 20
3.357 Vistas

This is the Test Vi

Mensaje 18 de 20
3.309 Vistas

@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
Mensaje 19 de 20
3.291 Vistas

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
Mensaje 20 de 20
2.511 Vistas