LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change colors of OK button with properties

Solved!
Go to solution

Hello,

how can i change the two colors of the ok-button with properties?

I found the colors property that returns (when read out) an array with 4x2 numbers.

Somewhere was an color-constant where you can pick the color and are not using the numbers...

 

Thanks for help

0 Kudos
Message 1 of 7
(4,277 Views)

Hi Only,

 

I found the colors property that returns (when read out) an array with 4x2 numbers.

Yes,correct.

Did you read the context help for this property node?

 

Somewhere was an color-constant where you can pick the color and are not using the numbers...

Yes, correct.

"audio/graphics" function menu -> "picture" functions…

Or use quickdrop!

 

how can i change the two colors of the ok-button with properties?

Instead of reading the property node you have to write new values into!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(4,262 Views)

Attached my currently not working solution.

The idea was that the loop makes the button blinking.

How do i have to set the color-constants?

Thx

0 Kudos
Message 3 of 7
(4,256 Views)

Hi Only,

 

The idea was that the loop makes the button blinking.

How should that button blink (aka change colors) when you have set the very same colors for all 4 states?

To have it "blink" you should have different colors for ON and OFF state!

 

Btw. you can set those two colors in the right-click properties dialog of the LED…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(4,253 Views)
Solution
Accepted by topic author OnlyOne

Ok, its working now.

(In the end i dont need a blinking button. I need to change the color as the two colors that can be set with right-click are not enough.)

0 Kudos
Message 5 of 7
(4,249 Views)

What is it you're hoping to accomplish?  I'm struggling to think of any use case where having that many colors for a single button is a good design decision.  If I understand what you're trying to accomplish better, we can probably help you find a more elegant way to reach your desired goal.

Message 6 of 7
(4,204 Views)

Originally, you talked about a colored OK button (which is a control), but now you seem to want a colored boolean indicator. Clearly, we need more information on the exact use case, because that's quite different..

 

For an indicator, it is much simpler to use a colorbox. Now "the color is the data" and you can set any color you want at any time. (use a "select" node wired to a boolean to blink between any two). A colorbox can be made to look like an LED if this is desired. See this idea for details (and please vote for it!)

Message 7 of 7
(4,197 Views)