LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tree Control Drag and Drop Locking

Solved!
Go to solution

I'm wrestling with a really irritating issue whilst trying to implement an editor using the LabVIEW Tree Control and the in-built drag and drop feature.  I have a standard tree control and when I drag a row from one location to another it works just once,  I'm unable to drag and drop it again?  If I go to another row drag and drop works, but again just once - I can't move that row again?  Has anyone seen this issue and have any idea of the cause and a solution?

 

I tried to implement the drag and drop using custom event handlers but run in to similar issues due it seems to LabVIEW periodically not generating a drop or end-of-drag event.

 

Any help would be much appreciated.

0 Kudos
Message 1 of 4
(653 Views)
Solution
Accepted by topic author Sipic

Hi Sipic,

 


@Sipic wrote:

when I drag a row from one location to another it works just once,  I'm unable to drag and drop it again?


This may be because you disabled option Drag & Drop > Item Dragging > Allow Dragging of Parent Items.

 

When you drag & drop an item, its "child-only" flag is automatically reset to False (don't ask me why, LabVIEW is weird sometimes).

Since it is now considered a "parent" item, it can't be dragged a second time.

 

The simplest solution is to enable back option "Allow Dragging of Parent Items".

 

An alternative could be to register event "Drag Ended" and set the "Child-Only" flag back to true for all child items:

 

raphschru_0-1733952717625.png

 

Regards,

Raphaël.

Message 2 of 4
(618 Views)

You're a superstar Raphaël,  that was the problem exactly.  In my architecture the operator can only move child tags and the Child-Only bit was reset.  I've reset the bit again in my End of Drag event handler and the problem has gone.

 

Don't you just love undocumented LabVIEW features (although it may be documented some-where that I couldn't find).

 

Many thanks

Simon

0 Kudos
Message 3 of 4
(601 Views)

After some research, this is an historical bug appeared with LV8.2 something like 18 years ago.

 

See this thread, this is truly enlightening:

https://forums.ni.com/t5/LabVIEW/LV-8-2-Tree-control-item-s-Child-Only-property/m-p/424426

 

Apparently it has been acknowledged and reported multiple times by NI employees (now retired) over time, but still this has not received any correction nor official response.

 

P.S.: I also found it listed here in the (unofficial) LabVIEW Wiki: https://labviewwiki.org/wiki/List_of_known_issues

Even better: the wiki says that it was generated from official NI's known issues for each LV version, but then when you go to the NI page, anything below LV2014 is missing completely...

0 Kudos
Message 4 of 4
(588 Views)