LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure: mouse leave AND value change?

Hello all,

 

Is there any way to to "disable and gray out" a knob on my front panel when the mouse leaves the button AND ONLY IF the value was changed (without using an event structure within an event structure)?

 

I have tried the following events (and combinations):
– Value Change: As soon as the value changes the least bit (from 0 to 0.001 or whatever), the button is grayed out.
– Mouse Up: Unfortunately the button is also grayed out when the mouse button is clicked elsewhere, the mouse is then dragged onto the button and the finger is liftet then (without having changed the value).
– Mouse Leave: Disables/grays out the button even if the value was not changed.

 

Unfortunately with "Mouse leave", there is only Source/Type/Time/CtlRef accessible. If there was Old and New Value (like with "Value Change"), I could compare both and only disable/gray out if they are not equal.

 

I use Labview 2016.

 

Thanks in advance
T139

Download All
0 Kudos
Message 1 of 4
(2,661 Views)

Store a flag for if the value was changed in a shift register.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,651 Views)

Thanks for the quick advice. I had just come up with the attached solution. Style- or performance-wise, does it make a difference which way to go?

 

Thanks again!

Download All
0 Kudos
Message 3 of 4
(2,630 Views)

Hi T139,

 

my two cents:

- you don't need to read from a value property node when there is a terminal available next to it.

- I would advise NOT to block your UI for 5 seconds because you want to wait in an event case!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,596 Views)