LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drag and Drop item from MCLB and update a particular cell of another MCLB

Solved!
Go to solution

I am a very new LabVIEW developer that has been working on a feature to implement the ability to drag an item from one MCLB to another and update a particular cell (based on where you drag the item) with the information contained in the drag. I was able to get a very crude solution implemented and it illustrates my problem and solution very well.

 

I was unable to find any other way of doing this, so it now causes an issue in continuing to add functionality to drag and drop interactions. As an example would be wanting to rearrange data in one of the MCLB's.

 

There are quite a few problems with this implementation, though it does seemingly work to provide the drag functionality I want. However, there must be a better way to do this programatically and not have to rely on "hard coded" values.

0 Kudos
Message 1 of 7
(2,916 Views)
Solution
Accepted by topic author Nate_S

Hi nsecrist,

 

your event structure with the drag events blocks an original functionality of MCLB to move and copy rows. Please find attached modification of your code. I used double click event instead of drag event and stored the value into string "element". If you double click to MCLB, the value from cell will copy to "element" and if you double click with "Shift" key pressed, value from "element" will copy to the cell of MCLB. I know this is not as straightforward as drag and drop but I hope it helps you.

 

Best regards,

CaravagGIO

Message 2 of 7
(2,868 Views)
Thank you very much! I can't wait to try this out on Monday.
0 Kudos
Message 3 of 7
(2,865 Views)

I really like the solution you provided, but unfortunately it does not accomplish what I am trying to do.

 

I think that if I could somehow pass the source of the starting event to all of my overridden events, I would be able to provide logic to perform the different things I need to. I did a little bit of reading on dynamically created events and 'remote sources' as I think they are called. This looks promising and might allow me to pass the triggering source for the event through all subsequent events.

 

Does this seem like a valid solution?

0 Kudos
Message 4 of 7
(2,832 Views)

Hi, I have forgotten to remove the element from source MCLB but it can be done with "Delete From Array" vi. I am sorry at the moment I have no idea how to do it using Dynamically created events.

0 Kudos
Message 5 of 7
(2,825 Views)

If you don't mind me asking, how did you manage to get the originating row of the dragged data? That would prove rather useful in my event structure.

0 Kudos
Message 6 of 7
(2,818 Views)

I went ahead and accepted your first reply as the solution, I appreciate the time you took to give me some insight into other ways this sort of functionality could have been accomplished. I was able to develop a solution which works for what I need it to.

 

Thanks again!

0 Kudos
Message 7 of 7
(2,810 Views)