From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

drag and drop from Multicolumn listbox to another Multicolumn Listbox

how do i drag and drop from Multicolumn listbox to another Multicolumn Listbox?/...any example..

use LABVIEW 8.2.1

 

regard's

eyal.

0 Kudos
Message 1 of 12
(8,610 Views)
I suggested this in June. To my knowledge, there is no way to drag and drop or copy and paste.
Cory K
0 Kudos
Message 2 of 12
(8,608 Views)
Take a look at the attached VI, it allow you to drag from the left listbox to the right listbox and it is set to copy the data (you can set it to move by right clicking on the listbox and selecting Drag and Drop > Drag Mode > Move). You basically need to use three events to handle a drag and drop...the Drag Starting? event on the source listbox, the Drag Enter? event on the target listbox and the Drop? event on the target listbox. Hope this helps!
Message 3 of 12
(8,580 Views)

thank's robweaver it's working fine.

but if i want  to drag and drop in the TARGET to rerange the row's how do i do this?//

0 Kudos
Message 4 of 12
(8,560 Views)

right click on the multiclumn listbox->Drag and Drop and select "allow dragging" and "allow dropping" option. Now you should be able to rearrange the data.

 

Guru

Regards
Guru (CLA)
0 Kudos
Message 5 of 12
(8,552 Views)

i did that but it's not working....

 

0 Kudos
Message 6 of 12
(8,541 Views)

To drag and drop within the target listbox you'll have to add a Drag Starting? event for the target listbox and register that drag data with a different adn unique Drag Data Name, then in the Drag Enter? event check for that data name as well before accepting the event, and then in the Drop? event for the target listbox handle the new data name as well. You can use the Point to Row Column invoke method to determine which row, column, or cell is being manipulated. I've created a VERY crude example of this, but you'll have to get more creative with how you handle the moving of rows, columns, etc. for the target listbox, but I think it gives the general idea. Hope this helps!

 

-rw

0 Kudos
Message 7 of 12
(8,524 Views)

i hope you got solution for drag and drop from one control to another and its working fine.

 

Now i understand that you would like to rearrange the "target control" then select the "move only " options in the "drag mode" (right click on the control and select the "drag and drop" option.

 

If you want to duplicate the value in the control use the option 'copy only'

 

 

Guru

Regards
Guru (CLA)
0 Kudos
Message 8 of 12
(8,503 Views)
Looks like this is a popular idea.
Cory K
0 Kudos
Message 9 of 12
(8,486 Views)

hi Guruthilak

may thank's solution and it's working fine.

thanks

eyal

 

0 Kudos
Message 10 of 12
(8,465 Views)