goran Posted August 14, 2008 Report Share Posted August 14, 2008 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. Quote Link to comment
Francois Normandin Posted August 14, 2008 Report Share Posted August 14, 2008 QUOTE (goran @ Aug 13 2008, 04:49 AM) 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. After setting the Drag n Drop properties of the listbox to allow for it, monitor the Drop event over the ActiveX container. In this example, I used a textbox in an ActiveX container. Quote Link to comment
Mellroth Posted August 14, 2008 Report Share Posted August 14, 2008 QUOTE (normandinf @ Aug 13 2008, 02:38 PM) After setting the Drag n Drop properties of the listbox to allow for it, monitor the Drop event over the ActiveX container. In this example, I used a textbox in an ActiveX container. 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.