LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change colors of all controls

Can I programmaticaly to change (to switch between two options) the color of ALL controls by some common command without dealing with property node of each control?
 
Thank you,
Boris
0 Kudos
Message 1 of 14
(4,239 Views)

As far as i know.. No.

But it's easy to get an array of all controls.... then just use a For Loop

0 Kudos
Message 2 of 14
(4,235 Views)
Or you could use the system colors, and then change the system colors (e.g. switch between WinXP and Win Classic).

Felix
0 Kudos
Message 3 of 14
(4,209 Views)

Pnt,

Thank you. I tried it as in example with decorations: http://zone.ni.com/devzone/cda/epd/p/id/5217.

But it looks that this option is not available for controls.

 

Download All
0 Kudos
Message 4 of 14
(4,194 Views)
It's going to be more complicated than that, as you will have to typecast your generic control to a specific control to get to the options for colors there.  It will not be a trivial process, as you will have to determine the control type and then have a case statement for every type you want to support.
Message 5 of 14
(4,189 Views)
I have to agree with Mathew K on this one.
 
Add to that if any of the controls are system, changing the color is not an option.
 
But otherwise it can be done. My Adaptive Save Restore Nugget was written to get at the data from any control but some of the techniques we discussed there can be adapted to do the colors.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 14
(4,180 Views)
You can change the label foreground and background colors and the color of the text. Might this be good enough? Having just the control label coloring scheme change instead of all the controls in their entirety might be a little more subtle but just as effective.
PaulG.
Retired
0 Kudos
Message 7 of 14
(4,173 Views)
Acctualy I need to have my display in two modes: regular colors and very dark colors and to be able to switch between these two modes. 
0 Kudos
Message 8 of 14
(4,157 Views)

Adding to PaulG ....

you can also make controls transparent and use decorations for the backround.

 

0 Kudos
Message 9 of 14
(4,145 Views)
Another option you have is to make two different GUIs and pass down control references to a subVI which is your program.  The issue with this is updating variables via references isn't as nice as wire directly to a terminal.  So if you are intensely updating indicators, then this may cause issues.  But, it would allow you to effectively "switch out" your front panel without duplicating all the code.
0 Kudos
Message 10 of 14
(4,139 Views)