LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

toggle boolean text on switch

Hi,

I want to toggle the boolean text of slide switch from left to right. Depending the switch state.

Isn't there any easier way than to change the text position with attributes?

Yves
0 Kudos
Message 1 of 12
(4,907 Views)

Hi Yves

In LV8.0 (and very likely in higher versions) you can open a properties window. In this window you can set the boolean control to have mutliple strings, which means one string for true and one for false.

Hope this helps.

Thomas

Message Edited by becktho on 12-04-2006 01:43 PM

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 12
(4,898 Views)
Hi,

  1. Create your toggle button
  2. Enable boolean text
  3. Drag the text on the left side (OFF)
  4. Switch to "ON" and add 20 or 30 "space" before the ON to have this "                  ON"
  5. Drag the text so that the "ON" is on the right side
  6. Select the text ("           ON" and justify to right
  7. Switch to "OFF"
  8. select the text ("OFF" ) and justify to left
here is an example 😉

No idea on how to do the same with vertical toggle...

hmmmmmmmm.... I was a bit late and Becktho's method seems better, but mine works in LV 7 😛


Message Edité par TiTou le 12-04-2006 01:55 PM


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

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 12
(4,899 Views)
Obviously I gave the answer to another question... 😉
 
If you want to change the position of the boolean text, I suggest to make a subvi, which handles this.
 
Although you may get the same result as with Titou's method, this is a little bit more "Pro"-style (Nothing against your idea Titou, it's just not the way I'm used to... ;)).
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 12
(4,888 Views)
To be honest, I would not do as I said, but Yves asked "without property node"

😉


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

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 12
(4,886 Views)

" No idea on how to do the same with vertical toggle..."

For a vertical switch do the same but pad with CR instead of spaces.

Ian

0 Kudos
Message 6 of 12
(4,883 Views)
Sometimes it's quite hard to give an answer, because it is requested, although you would not soggest it or use it yourself - isn't it?
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 7 of 12
(4,883 Views)
Indeed Becktho !! ... Many times answers begin by someting that "Are you sure you want to do this Smiley Surprised ?"

Smiley Very Happy

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

Epictetus

Antoine Chalons

0 Kudos
Message 8 of 12
(4,880 Views)

I think that's a consequence of a programming language usable by non-programmers...

 

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 9 of 12
(4,877 Views)
 
Ben

Message Edited by Ben on 12-04-2006 08:23 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 12
(4,866 Views)