05-17-2017 10:32 AM
can you give me example please in "vi" i'm beginner in labview i could not make it ?
12-13-2017 04:51 AM
I'd like to resurrect this thread.
When placing a transparent path control in front of my panel, and choosing to make it visible when "mouse leave", i then can drop files from explorer to this control.
The problem is setting it invisible again. If I do this on event "mouse enter", the control will be set invis before accepting the drop and therefore value change will not occur.
If I don't set it invisible on "mouse enter" I don't know when exactly to set it invisible. I could do this in the "value change" event of the path control, but what if the user does not drop something, just moves the mouse back to the window. Then the path control will stay visible and block access to the underlying controls.
Any ideas?
Thx in advance
12-13-2017 05:08 AM - edited 12-13-2017 05:09 AM
On Mouse Enter, activate a flag in a shift register. On Timeout, hide the control if the flag is on, then reset the flag. Hide also on Value Change.
This technique is not perfect, however: during the timeout time, the user could get no response from the other controls. On the other hand, if the timeout time is too short you may miss the drop operation.
12-13-2017 06:25 AM
That was a good idea.
I don't like to use "Timeout" so now in the "mouse enter" event i set a control "flag mouse enter" to true and with this fire the "flag mouse enter: value change" event. In this event i set the path control to invisible again (and the flag control).
The good thing with this is that the "path control: value change" event is still registered and fired after, unlike when setting the path control invisible directly in the "mouse enter" event.
Thx
12-13-2017 11:43 AM - edited 12-13-2017 11:51 AM
Check out this example.
https://forums.ni.com/t5/Example-Programs/Windows-Explorer-in-your-front-panel/ta-p/3492301
It does some fancy things with Windows Explorer, but the main idea is that once it is running, drag one of the text files from the left pane to the graph and drop it. It will load the graph with the data from the control. Looking at the VI you will see the transparent path control is made visible and invisible at times like mouse enter, mouse leave, and value change on the path control. This is the simplest, but hacky solution.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
12-14-2017 12:42 AM - edited 12-14-2017 12:46 AM
That is also interesting.
For me, the "Path Control:Value Change" event did not fire because "Mouse Enter" would execute before and make the control invisible.
Here in the example it works just fine. It does not fire the "Mouse Enter" Event when dragging and therefore does not make the path control invisible before dropping.
I used "This VI:Mouse Enter". Maybe that is the difference. In the example we stay within the front panel and "Chart:Mouse Enter" is used.
Thx