LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Drag Child into Tree Control Or Get Drag Data

Solved!
Go to solution

Objective: Depending on the 'Drop Data' I want to launch a different nested actor, and the 'Drop Data' must be able to be a parent or child item. The user should also be able to rearrange the tree control.

 

Dragging and dropping between trees is easy enough (either using the right click menus or using event structures). However, I want to be able to programmatically be able to 'Allow Dropping Between Items' so my new item can either be a top level or child level item. Using the event structure approach to drag/drop data seems to remove this ability.

 

If there is a way of finding out what the new data is without having to use the event structure that would also solve my issue. I guess I could look at the difference in tags between the old and new tree and launch an actor using that information. However, I would have to look through all the tags and find their associated strings sequentially which would be very resource/time intensive. So a better alternative would be much appreciated!

 

I think I am having the same issue as this topic:

https://lavag.org/topic/15129-drop-on-tree-control/

 

I have attached a simple example project (LV18 32-bit) that shows the issue.

0 Kudos
Message 1 of 3
(2,263 Views)
Solution
Accepted by topic author McQuillan

I have implemented the work around I mentioned in the post and that works. However, it just feels *wrong*. I would hope there's a better way.

 


@McQuillan

 


I guess I could look at the difference in tags between the old and new tree and launch an actor using that information. However, I would have to look through all the tags and find their associated strings sequentially which would be very resource/time intensive.

 

0 Kudos
Message 2 of 3
(2,252 Views)

Just for completeness - if anyone else is having this issue:

The CAR (285577) which was to fix this issue (mentioned in the link above - posted in 2011) was rejected by R&D in 2014

0 Kudos
Message 3 of 3
(2,225 Views)