LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Button as control/indicator?

Hello,

 

I'm new using labview and I was asked to create a button that displays a string, but once you click on it you can write a new string on it,replacing the old one. Does any one know how to do this?

0 Kudos
Message 1 of 9
(5,324 Views)

You are referring, I assume, to the text that is contained within the button. The "Strings" property node allows you to set this text. From the LabVIEW Help on that property:

Array of up to 4 strings. Strings include text for False, True, True to False, and False to True. If you set the Boolean control to allow multiple strings, this property always returns an array of four strings when reading. When writing, you can pass in an array of length 1, 2 or 4. If you pass in only one element, this property uses that element value for all four states. If you pass in two elements, this property uses the first element value for the False and True to False states. Similarly, this property uses the second element for the True and False to True states.

To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

Message 2 of 9
(5,316 Views)

Hello,

If you right click on the button on the front panel, on the "Appearance" tab enable the option called "Multiple strings" this lets you have a different text for when the button is True or False. Is that what you need ?

 

Hope this helps


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 9
(5,309 Views)

@ smercurio : the first link you gave "allow multiple strings" is broken :-o...

 

@ akire0 : my post explains how to activate this option.

 

 


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

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 9
(5,300 Views)

Thank you all for the help, this is part of what I need, I have a next question. If I set this multiple string, once I run the VI can I type over the string once I click the button and set a new string. Any ideas on how I can accomplish this? I really appreciate all the help.

0 Kudos
Message 5 of 9
(5,291 Views)
Perhaps this is what you are trying to do?
Change Button Text
Message Edited by jmcbee on 08-20-2008 09:17 AM
Download All
0 Kudos
Message 6 of 9
(5,284 Views)

TiTou wrote:

@ smercurio : the first link you gave "allow multiple strings" is broken :-o...


I actually didn't make that link. That was a straight copy and paste from the LabVIEW Help, and I didn't notice there was a link in the text. Thanks for pointing it out. Unfortunately, I can no longer edit the message to remove the link. 

0 Kudos
Message 7 of 9
(5,279 Views)

I don't think you can edit the boolean text directly when the VI is running like you do when it's not running. You can do this programmatically by using the property node "Strings".

 

here is a quick example.


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 9
(5,276 Views)
Thank you for your rapid response, this is exactly what I needed Smiley Very Happy
0 Kudos
Message 9 of 9
(5,267 Views)