Jump to content

Listbox drag n drop


goran

Recommended Posts

I got a small .vi with a Listbox. The Listbox is filled with filenames (not the complete path), is it possible to add drag n drop from the Listbox to a ActiveX component? The filenames is of media files I would like to load them by dragging them out of the Listbox to the ActiveX component. I found a setting to make drag n drop work "inside" the listbox to rearrange the elements, but I want to drag n drop outside the listbox. How can I do this? Do I need to customize the Listbox or create a new controll? Im new to labview so the question might be stupid, but I didnt find any good answer when searching the forums.

Link to comment

QUOTE (normandinf @ Aug 13 2008, 02:38 PM)

I don't think this was possible in LabVIEW 7.1 (assuming goran is using 7.1)?

QUOTE (goran @ Aug 13 2008, 10:49 AM)

...How can I do this?...

So to implement this in LabVIEW 7.1, you would either have to create your own drag'n'drop; using mouse down events, copying data, tracking where mouse was released etc., or go for another solution

If you only have an ActiveX component as the target for the drag and drop (i.e. only one target), you could probably use double-click in the listbox instead as a trigger to copy data from the listbox to the ActiveX component.

/J

PS. I decided to make a small VI for you that makes a quick and dirty drag-n-drop possible in LabVIEW7.1.

It also shows how to use double-click instead.

Download File:post-5958-1218635787.vi

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.