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 APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I set the color of a control programatically?

Hello,

I would like to set the color of front panel controls by scripting. This only seems possible for some elements. A cluster has the property "Color",  a boolean element has "Colors[4]" and a decoration and a tab control have "Colors". What is about the other controls like numeric, array, string and ring?

Greetings,

shb

0 Kudos
Message 1 of 4
(6,002 Views)

First, you can't set color on "system controls".

Then for other controls, it depends really... For strings/numeric/path for instance you can set different colors for different part of the control.

For a numeric : property > Numeric Text > Text Colors > BG Color + Text Color : that's for background color plus text color.

Hope this helps a bit


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 4
(3,227 Views)

did u try to use property node for the controller u want change its color ?

Lecturer
Machanical Power Department
Helwan University, Egypt
0 Kudos
Message 3 of 4
(3,227 Views)

Not exactly I am afraid...

For the "system controls", you could set the text color but background color via property node

0 Kudos
Message 4 of 4
(3,227 Views)