LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to address a page of a tab selector by name?

I have a VI with a tabbed interface with 5 tabs. I know how to address one of the tabs (as you know a page in LabVIEW lingo) to activate or deactivate it by using the numerical index. Now I need to add another page at position 3 and my references to pages from number 3 on upwards break. For the future I would like to become independent from the numeric values.

Is there a way to address a page by using its label or caption?

 

Hans

0 Kudos
Message 1 of 3
(2,498 Views)

You can change the name of the tabs to what ever you want. The problem that you will have is that any time you add or delete a tab you will have to replace the type defs that were created before you changed the tab control. If you get a property node or local variable and you right click and have it create a constant you willbe able to see all of the values of the tab control.

 

You will always have to replace the type def if you change the control.

Tim
GHSP
0 Kudos
Message 2 of 3
(2,487 Views)

On the block diagram, if you right click on the tab control and click create constant, it will create an enum with the values being the names of the pages.

 

If you make your tab control an indicator, you can feed this enum into it and the active page will change to whatever you have selected in your enum.

 

 

[EDIT] Like Tim said though... be sure you name your pages first.  

0 Kudos
Message 3 of 3
(2,486 Views)