From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-18-2017 04:14 AM
Hi,
How labview can detect if the mouse is dragging a file in VI or not befor to drop it in the path?
Thank you .
08-18-2017 09:29 AM
I'm not sure I understand your question completely. If a file path control has "Allow Dropping" enabled, you should be able to drag a file from anywhere and drop it in the path control and the path to that file will be updated in the control. If you want to catch the drop before the path to the file is populated, use an event structure and register a Drop event on the control. You can use this to, for instance, check the file extension and filter out unwanted files. Do this by wiring a false constant to the Accepted? terminal in the Drop event.
08-18-2017 09:47 AM
For some reason, this doesn't work as I would expect. Enabling the option to "Allow Dropping" works and lets me drag a file and update the path, but the Drop filter event is not firing. I'm still on Labview 2012 so maybe this has changed in newer versions.
08-18-2017 10:35 AM
Just tried in 2015. Allow Dropping works but the drop filter event did not fire.
08-18-2017 12:09 PM
Turning off dropping doesn't allow you to drag a file into the control, as expected. So this does seem to be a valid drop action. Only the Drop event doesn't fire.
Seems like a bug to me.