annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

Tree Drag Drop - Insert At Same Level or Indent Detection

Résolu !
Accéder à la solution

I have a setup where I am dragging and dropping from one tree to another.  Most items are child only, but some are children and can have children under them.  When preparing to drop the tree reacts showing that a drop will be on the item (and be inserted as a child) or after the item and be at the same level.  Since I need to keep track of operations I'm not using LabVIEW's built in functionality and am instead monitoring the data and inserting into the tree items as needed.

 

So my question is this.  How can I detect when a drop occurs and it should be inserted at the same level as an item, or inserted as a child of that item?  The mouse behaves differently based on where it is when you are dropping but I can't seem to detect what operation I should be doing.  I saw several discussions online about this in regards to a CAR 285577 which it sounded like was rejected.  Any suggestions?  Thanks.

0 Compliments
Message 1 sur 4
3 902 Visites
Solution
Accepté par l'auteur du sujet Hooovahh

It looks like CAR 285577 was indeed rejected. It is also tied to CAR 241471 with the same issue you are experiencing which notes that:

 

"According to this this thread, where Jeffery Peters posted, this is expected behavior"

http://forums.ni.com/t5/LabVIEW/Tree-Control-Drag-Drop-in-LabVIEW-8/td-p/304816 

 

It is unlikely that there are any real workarounds at this point.

Message 2 sur 4
3 833 Visites

It looks like CAR 285577 was indeed rejected. It is also tied to CAR 241471, which states:

 

"According to this this thread, where Jeffery Peters posted, this is expected behavior"

http://forums.ni.com/t5/LabVIEW/Tree-Control-Drag-Drop-in-LabVIEW-8/td-p/304816 

 

It is unlikely that there are any real workarounds at this point.

0 Compliments
Message 3 sur 4
3 833 Visites

Thanks for referencing that thread that apparently I forgot about.  A solution was posted in that thread which does show the ability to drop items on an item or between. It does so by just doing measurements on the pixel location of the drop that took place.  Pretty hacky but it will probably work in my situation.

0 Compliments
Message 4 sur 4
3 820 Visites