LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

System style buttons remain blue after being released

Solved!
Go to solution

I'm running LabVIEW 2017 on a windows 10 machine and I've noticed a strange behavior with the system style buttons.

If I press the button and release it while my cursor is still hovering over the button it will remain blue. It will do this regardless of the mechanical action of the button, and regardless of whether or not the value has been read elsewhere in the code.

If, however, I press the button, move my mouse off the button, and then release the button then it will return to its default gray state.

 

If the button is stuck blue there are a few ways to force it to return to gray.

  • I can tab through the controls until the offending button is highlighted, at which point it will return to gray. However if my mouse if over the button when I tab to/off of it then it will stay blue.
  • I can press it again and release it when my cursor is off the button
  • I can stop the VI and all blue buttons will return to gray

This behavior isn't seen with other button styles

 

I'm wildly confused by this behavior and I'm wondering if someone else has experienced this before and knows how to work around it? I prefer the look of the system style buttons, so I'd like to try to stick with them for this application. Being blue doesn't affect their functionality in any way that I can tell, it's just not good for UI design.

 

0 Kudos
Message 1 of 22
(3,723 Views)

Post your code that shows this behavior.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 22
(3,721 Views)

Sorry, Here are some screen caps I took of a simple VI running with this behavior. It's just a few buttons and indicators in a while loop. The VI is attached below. I wouldn't be surprised if this only happens with 2017 on windows 10 since it's a system related issue

Before interacting with the buttonsBefore interacting with the buttons

While pressing the button (cursor not visible in screencap, but it's over the button)While pressing the button (cursor not visible in screencap, but it's over the button)

After releasing the button (cursor not visible in screencap, but it's over the button)After releasing the button (cursor not visible in screencap, but it's over the button)

 

 

0 Kudos
Message 3 of 22
(3,714 Views)

system button has 6 images, both TRUE and mouse over are blueish.

You can customize the button to make mouse over not blue.

 

George Zou
0 Kudos
Message 4 of 22
(3,703 Views)

First of all, you have a loop running at maximum speed hogging the CPU cycles.  Add a small wait value to slow it down. 

Secondly, system buttons have a Hover state that is a lighter shade of blue.  I think this is what you are seeing.  Move the mouse away from the button and the button goes back to gray.

Thirdly, Use an event structure to detect the changing states of a button.  This way, you can put the terminal inside the event case to insure that the value is read immediately. 

event.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 22
(3,703 Views)

This is just an example code, the actual application I'm running these buttons in has a wait time of 10ms in the loop and uses an even structure to deal with the UI, so that's where the button in question is living. 

 

The button does properly reset to false, it just stays in the light blue, "mouse hover," state even when my mouse is not hovering over it. I can't find properties in the button options to adjust that state. Where would I be able to do that?

 

edit - Here's a screen cap of where I actually use this button in my code

application.png

0 Kudos
Message 6 of 22
(3,697 Views)

Where can I find the option to customize that mouse over state? It's not in the properties menu as far as I can tell

0 Kudos
Message 7 of 22
(3,695 Views)

If the button never leaves the hover state, that sounds like a bug to me.  I cannot recreate that with the VI you posted.

 

Regarding your actual code, the wait is not needed in the event loop.  The event structure itself will slow down the loop.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 8 of 22
(3,692 Views)

Do you know some way I could find a solution to this bug? I figured posting on the forums was how I go about doing that...

0 Kudos
Message 9 of 22
(3,689 Views)

As far as I can tell, what you are describing is the intended behavior.  Light blue when pressed, lighter blue when mouse is hovering over it.  Seems to be the case with system buttons outside of LabVIEW as well.  I don't see a bug.  In fact, I'd leave it the way it is, as the way it is seems to be the Windows default - and therefore expected - behavior.

 

As far as changing it goes, I believe this is a property only found in the property node.

 

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 22
(3,682 Views)