LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Color Coded Toggle Switch

I am trying to build an array of toggle switches where the toggle switch selection is color coded (0 - red, 1 - blue, 2 green).  So, if you press the switch once it turns red, twice it turns blue, and three times it goes green.  You can do this with a boolean, but I nee more than 2 states for the switch.

0 Kudos
Message 1 of 6
(2,515 Views)

I think a picture ring is what you want.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 6
(2,509 Views)

Are you actually trying to use a toggle switch, or a regular button? The question of 3 states for Boolean controls has been brought up before, and a search will yield numerous solutions. Ben's picture ring idea is one of these solutions, and is quite simple.

0 Kudos
Message 3 of 6
(2,488 Views)

I simply want a switch that changes color as you toggle it, so you can visually tell what state the switch is in by it's color.  I have never used a picture ring before, and I am trying to figure out how to get it to have more than one state.  The enumerated control has the add case after/before option on it, but I don't see how to do that with the picture ring.

0 Kudos
Message 4 of 6
(2,484 Views)

@rpackard_lsi wrote:

I simply want a switch that changes color as you toggle it, so you can visually tell what state the switch is in by it's color.  I have never used a picture ring before, and I am trying to figure out how to get it to have more than one state.  The enumerated control has the add case after/before option on it, but I don't see how to do that with the picture ring.


Use the control editor (advanced customize) the use the Import image.... choose your flavor.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(2,479 Views)

You can do that but if you have an array of controls then aren't they all going to be identical?

 

Edit - you were not talking about toggle switches but picture rings Smiley Very Happy

=====================
LabVIEW 2012


0 Kudos
Message 6 of 6
(2,473 Views)