LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two boolean buttons with colors and text?

HI,
I need two boolean buttons which will represent a power switch. So one will be ON and one will be OFF, but I need the text to be right on the button and I also want the buttons to switch colors. I have found only one or the other property (text on button or color) but not both on the pallette. Am I just not looking at the right buttons/properties? Please recommend what I should be using. (i.e. when ON is depressed I want it to be green, and OFF to be grey and viceversa)
0 Kudos
Message 1 of 4
(2,391 Views)
First, right click on the control and make sure that for the control your're using, Boolean text is one of the visible items. Now you can edit the text. You can edit the color with the color tool. Next, click on the control to change to the other state. You should be able to type different text and use a different color. If you can't use different text, go into the control editor by selecting customize from the Advanced menu, and right click on the control and then choose Multiple Text Strings.
Message 2 of 4
(2,391 Views)
Hi,
Thanks for addressing the question, but I was gearing it more at how to switch things dynamically on the block diagram (i.e what properties to use?) vs. the front panel description you gave, any ideas?
0 Kudos
Message 3 of 4
(2,391 Views)
Programatically, there are two attribute nodes, one of them is strings, which will accept an array of 4 strings, being the following:
1-OFF state
2-ON state
3-ON to OFF state (when latched or switched until release)
4-OFF to ON state (when latched or switched until release)

The other attribute is Colors, which is composed of an array of clusters of two numeric or color constants(controls):
1-OFF sate foreground and background
2-ON state foreground and background
3-ON to OFF state foreground and background (when latched or switched until release)
4-OFF to ON state foreground and background (when latched or switched until release)

Hope this helps
Message 4 of 4
(2,391 Views)