Example Code

Change Label Text of Control in Another VI

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • LabVIEW

Code and Documents


Download All

This example demonstrates how to change the label of a control/indicator in another VI programmatically.



To change the label, you need to open a reference to the VI with the control you would like to change the label of. You can then get a reference to the front panel. From the front panel you can get an array of references to the controls. Index the array to the desired control and use a property node to set the label text.




  • LabVIEW Base Development System 2012 (or compatible)


  • No hardware is necessary to use this example VI


Steps to Implement or Execute Code

  1. Download and open the attached ZIP-file
  2. Open the Simple VI and the Change Label Text VI
  3. Run the Change Label Text VI


Additional Information or References

Change Label Text - Front Panel.png

Change Label Text - Block Diagram.png


Note: The VI that contains the control you want to change the label of cannot be running. Changing the label is editing the VI and cannot be done while it is running.


**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

Bryan H.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.


Hello Hesloppy,

Why are you changing the Label?  As you pointed out the cannot be changed at runtime. The Caption can be changed at runtime.



NI Employee

Hi Gary,

I am not sure of the use case for it.  I talked to someone who wanted to be able to change the label so I put together an example.

Best regards,


Bryan H.
Active Participant
Active Participant

Scripting ishaving LabVIEW write LabVIEW code for you, so you might want to open a template of a VI, replace a control with a new one, and then change the label - which can all be done automatically by LabVIEW

Ryan Vallieu
Senior Systems Analyst II
NASA Ames Research Center

how can change the language of labels from English to other. Is it possible using labview?


Hello Srikant,

The Labels of Controls and Indicators cannot be changed at run time. You

could however

change the Caption text of the Controls and Indicators. Instead of

displaying the Label

text display the Caption text. Then you can change the language of the

text in the Caption

at run time.

You could also change text of Ring Controls but not ENUM Controls.

I hope this helps.