LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Different 'mouse enter' event / 'set busy' vi behaviour in LV8?

In my program, I used the mouse curcor 'set busy' vi to lock the front panel during a measurement.  However, I did want the 'cancel measurement' button to be available.   I solved that by adding a 'mouse enter' and 'mouse leave' event for that button, that would enable the mouse when it was over the button.  (And disable when it left again)
 
Worked fine in LV7, but it seems that in Labview 8, this little trick doesn't work anymore...   Smiley Sad
 
Apparantly, now the 'mouse enter' event only fires when the cursor isn't set to 'busy'. How do I perform something similar to my old trick in Labview 8? 
Message 1 of 3
(2,835 Views)
I too had a similar issue when upgrading my application source code from LabVIEW 7.1 to 8.0.  There are a couple of things you could try.
 
1) Keep calling the "set cursor busy" vi, but don't disable mouse clicks (a boolean input to the set busy VI). Now add a new event to your event structure to monitor the panel for any "mouse down?" events.  Whenever this event occurs, the user is trying to click somewhere, so wire a TRUE to the "Disabled?" input of the event.  Now to keep your cancel button from being filtered out, add some code to determine if the x,y coordinates of the mouse down event are over your cancel button, if so then don't filter this event.
 
2) Keep calling the "set cursor busy" vi, but again don't disable the mouse clicks.  Now whenever you want to disable all user events on your front panel controls, open a reference to each front panel control and set it to disabled (all except the cancel button of course).  This sounds difficult, but it is actually really easy.  There is a VI property you can read to get references to each FP control.
 
I personally used the 2nd option in my code to do something similar.  I've attached the VI you can use to disable all you FP controls (with exceptions), and also an example of how I used it.  It's a very small VI.
 
Hope this helps.
Message 2 of 3
(2,821 Views)

This is exactly what I need!   Thanks! 

I never realized that you could get a reference to all the controlls this easily...   This makes life a lot easier!

0 Kudos
Message 3 of 3
(2,806 Views)