04-24-2010 12:17 PM
04-24-2010 02:14 PM
zou wrote:Want to drag multiple items out of a listbox. Is this possible?
Whereto?
In the same VI?
Register for the 'drop' event on a control, the drag and drop data will have info, here's a sample VI. make sure you allow dragging from the Listbox.
The help is very specific on the actual data type in the info. However it's hard to understand:
LV_LISTBOX_ITEMS | Array of a cluster that contains an array of strings in the item you are dragging (in order from left to right) and an integer that represents the glyph index associated with the item from which you are dragging data. |
Ton
04-25-2010 12:05 PM
To a tree control in the VI. I don't want to handle the tree drop event because tree control takes care of it.
Thanks for reply.
04-26-2010 08:11 PM - edited 04-26-2010 08:12 PM
Hi George,
Dragging multiple items from a listbox is a matter of using the right settings for the listbox as shown in the image. Dragging from one listbox to another works just fine with these settings.
However, when dragging this to a tree control, it will only copy the first item. Therefore, you probably will need to use events as Ton mentioned.
04-27-2010 10:07 AM
Jared,
Thanks for reply.
I should mentioned that all those settings you pointed out have been set before I posted here.
Just like you mentioned it doesn't work if the target is a tree control.
This isn't my design. I just put on a finish touch. This tree control has complicated roles. I definitely don't want to handle the drop event.
I found a work around:
In the listbox drag end event, find the drop position, and programmetically add multiple items.