LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change individual tab text of a tab control

Solved!
Go to solution

 I would like to change the display text/label of individual tab of a tab control while the software is running. 

 

Can this be done? If not, is it a good idea for NI to add an "individual tab caption" attribute to the tab control, so it can be done easily?   

 

Thanks.

0 Kudos
Message 1 of 3
(4,100 Views)
Solution
Accepted by topic author Ian_Ren

Yes you can programmatically change the label of a tab.

 

http://digital.ni.com/public.nsf/allkb/F2C3875A7DC7C7BA86256B760007D122

 

Problem:
I would like to programmatically change the name of the pages of a Tab Control, is there a way to do this in LabVIEW?

Solution:
In order to programmatically replace the names of pages in a Tab Control follow the instructions and reference the VI snippet below.
  1. Create a tab control from the controls palette, Controls»Modern»Containers»Tab Control
  2. Create a reference to the Tab Control by right clicking the Tab Control and selecting Create»Reference and wire the reference to a property node.
  3. Select the Pages property from the property node.  The output will be an array of references of the pages of the Tab Control
  4. Wire the array of references to an Index Array VI ( Functions»Array palette ), the index will correspond to the page.
  5. Wire the output reference to 2 property nodes.  The first property node select TabCaption, the second property node select IndependentLabel. The TabCaption property will be the new names, and the IndependentLabel property will make the TabCaption independent of the page label.
  6. Run the VI.





Related Links:
KnowledgeBase 234G2S2L: Setting the Order of Controls When a Tab Control Is on the Front Panel
KnowledgeBase 4V0DSQQL: Programmatically Setting the Active Page of a Tab Control in LabVIEW
KnowledgeBase 3OI8L8IZ: Accessing The Controls In a Tab Control Programmatically
 
Cory K
Message 2 of 3
(4,089 Views)

Cory

 

Thanks for your help.

 

Ian

0 Kudos
Message 3 of 3
(4,058 Views)