08-20-2008 09:20 AM
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?
08-20-2008 09:32 AM
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.
08-20-2008 09:47 AM
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
08-20-2008 09:59 AM
@ 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
08-20-2008 10:03 AM
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.
08-20-2008 10:14 AM - edited 08-20-2008 10:17 AM
08-20-2008 10:19 AM
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.
08-20-2008 10:20 AM
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
08-20-2008 10:38 AM