LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Control Labels

I would like to change the labels of controls while the VI is running.  I'm using the label name as basis for data i'm retrieving off a database,in this case one of the controls is a boolean.  So basically I'd like to grab some piece of data and stick it to the label, but that data can change.  Any way to do this??  I see maybe running the VI in edit mode, not too sure on how to do that.  Any help would be appreciated. Thanks.
0 Kudos
Message 1 of 5
(3,377 Views)
You cannot change the label while the VI is running. You can change the caption.

You say you are using the label as the basis for data from the database. Does this mean that the database has a field which you are trying to match to a label? Or does the label identify the field you will use to get the data?

Lynn
0 Kudos
Message 2 of 5
(3,371 Views)
You cannot modify the label of a front panel item while the VI is running (and you can't run a VI in edit mode, either - they're two distinct, exclusive states).  However, you might be able to do what you want by using the "Caption.text" property instead of the label text.
0 Kudos
Message 3 of 5
(3,371 Views)
PERFECT.. Didn't even see that property....

Message Edited by Rooney on 05-11-2007 10:38 AM

0 Kudos
Message 4 of 5
(3,366 Views)
One other thing: If you wish to change the caption programmatically via a property node, you must first make the Caption visible manually on the front panel. Trying to write to the captions property if the caption has never been visible will produce an error. Regardless of the value of the caption the control label remains unchanged and the label is what you can see on the diagram.

Lynn
0 Kudos
Message 5 of 5
(3,353 Views)