Set the Active Page of a Tab Control Programmatically in LabVIEW

Updated Dec 20, 2017

Reported In

Software

  • LabVIEW Full
  • LabVIEW Base

Issue Details

I would like to programmatically set the active page of a tab control on my Front Panel. How can I do this?

Solution

To programmatically set the active page of a tab control in LabVIEW, you can write to either a local variable or a Value Property Node for the tab control.
 
To use a local variable:
  1. On the Block Diagram, right-click your tab control and select Create»Local Variable.
  2. If the local variable is not already set to write access, then right-click it and select Change to Write.
  3. Right-click the input of the local variable and select Create»Constant.
To use a Value Property Node:
  1. On the Block Diagram, right click your tab control and select Create»Property Node»Value.
  2. If the Property Node is not already set to write access, then right-click it and select Change to Write.
  3. Right-click the input of the Property Node and select Create»Constant.

Figure 1. Programmatically Set the Active Page of a Tab Control
 
The created enum constant will automatically populate with the names of the pages in your tab control. By selecting one of these pages to write to your local variable, you can programmatically set it to be the active page of your tab control on the Front Panel.

WAS THIS ARTICLE HELPFUL?

Not Helpful