From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to specify the color of a control or indicator?

What is the best way to command the color of a control or indicator? 
 
Can color be programmed within the code?  If so, which versions of LV have this feature?
 
Thanks,
 
Jeff
Jeffrey Bledsoe
Electrical Engineer
0 Kudos
Message 1 of 7
(2,553 Views)
Color can be set via a property node. You can set foreground color and background color. You can also customize a control using a built-in control editor. As far as which version, all current versions have this. It goes back quite a while.
Message 2 of 7
(2,537 Views)
You can change the color of controls and indicators by using the 'color' parameter in a property node.  I believe this has always been possible in LabVIEW.  (At least back to Ver. 4)
 
Here is a little example (LV7.1):
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 3 of 7
(2,534 Views)

Okay.  Another question. 

What if I wanted to set the color manually instead of using property nodes.  In the color pallette, can I manually select a precise color by entering a numeric value and does that method work all the way back to LV 5.1?

Jeffrey Bledsoe
Electrical Engineer
0 Kudos
Message 4 of 7
(2,520 Views)
I should have read your reply.  So, there is an option for a built-in manual control?
Jeffrey Bledsoe
Electrical Engineer
0 Kudos
Message 5 of 7
(2,517 Views)
If you right-click with the paint tool to open the basic coloring popup you will notice a little box with a palette icon in the lower right corner that opens up an advanced window where you can set the hue, saturation, RGB values, etc.  I'm not sure if this goes back to 5.1.  I'm using 7.1.
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 6 of 7
(2,513 Views)
Thanks.
Jeffrey Bledsoe
Electrical Engineer
0 Kudos
Message 7 of 7
(2,507 Views)