Search the Community
Showing results for tags 'drag'.
-
Hey, I've been doing some tinkering and can't seem to find a nice solution to this problem. Does anyone know of a way you can select multiple files from a path control? I know this can be done with the File Dialog Express VI, but I'd like to do it more gracefully from the front panel control. I don't think it's possible, but maybe someone here has some neat trick. Alternately, is there any way to capture the drag event from multiple files dragged from Windows? I know a single file dragged into a File Path Control will populate it with the correct path, but maybe there's a way to drag multiple files onto an array of paths or something. Thanks!
-
This VI demonstrates how you can bodge a VI to accept drag and drops of files and folders just like a path control (without losing any mouse click/move event functionality). Path controls have an API for dragging and dropping Files/folders from the OS, or correctly formatted strings from Excel. While an acceptable drag-and-drop operation is underway the path control adds a dotted box to the control (I'm calling this a target box). However this behavior is not available for other objects such as panes or other controls. So Bodging time. DragandDropBodge.vi (attached to the original lavag.org post) has a transparent Path control (set to 'Scale object with pane') that in all the use cases where a drag and drop is possible is set to Visible=True, and in all the use cases where the user would click on an object within the pane is set to Visible=False. I am using a shift register and the Timeout case to Visible=False the Path control, but for a more complex VI or when you have an existing need for the Timeout Case, you can manage this with a user event. Other implementations: This could be used to bodge drag-and-drop for a xy graph or other indicator instead of the pane at large. Or by capturing the cursor position at the moment of 'value update' for the path control a drag and drop could update a specific line in a tree/table/array. Hope this helps when you are searching with the same keywords I was and found no solutions! NSz DragandDropBodge.vi
-
- drag-and-drop
- drag
-
(and 3 more)
Tagged with: