LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bolean button change title

Hello,

I use a bollean ok button to open and close a shutter through a digital channel. Is it possible to change the writing on the button (e.g. from "shutter open" to "shutter close") as I change the status of the shutter.

Thanks in advance,

Gaby

0 Kudos
Message 1 of 5
(2,762 Views)
In LabVIEW, you cannot change the value of an Owned Label during run-time. An easy way to change the "label" for a control/indicator would be to use the Caption (Visible Items»Caption) to identify the control/indicator instead of the Label. You can, then, use the property node of the control/indicator to change the caption as shown in the attached image. Have a look at the following KB article:
Programmatically Changing the Label for a Control or Indicator in LabVIEW
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 5
(2,759 Views)
I realize I must have misunderstood your question. You are interested in changing the boolean text on the control instead of it's label. All you have to do is to use the right property to change the text on the control. Attached is an image which shows you the code and property you need to select. I apologize if I confused you.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 3 of 5
(2,756 Views)
No code required : Right click the button, then go to Properties > Appearance. You can then select "Show boolean text" and "Multiple strings"
Chilly Charly    (aka CC)
Message 4 of 5
(2,743 Views)

It all depends on what you are wanting to accomplish. If the button will be staying in or out when changed, the solution that chilly provided will work. If your button will have a mechanical action and you want the boolean text to change depending on the mode you are in, the property value technique is what you need.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(2,727 Views)