Sub-Tab Structure with Buttons on LabVIEW™

Updated Feb 2, 2026

Environment

Software

  • LabVIEW

This article has prerequisite knowledge of Event Driven Programming in LabVIEW please refer to the following link:

 

 

This article will show you how to create a Sub-Tab structure triggered by button events without using more than one Event Structure, since that approach is not recommended.

For be able to do this all you are going to need is the LabVIEW environment:

 

  1. Create an array of buttons, each individual button of the array would represent a different state that should take you to a different tab.
  2. Create an Event Structure inside a while loop.
  3. Add the event case of the array of buttons to be trigger by the Event Value Change.
  4. Create a for loop inside the Event Structure.
  5. Index both values of OldVal and NewVal into the for loop and connect them into the Not Equal? function.
  6. Get the interaction number of the loop out of loop and put a conditional tunnel which input is the output of the Not Equal? function.

The result should like this:

 

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram. 

 

With this code, the button that gets pressed would give a different index value that then can be used to open a different menu with more groups of buttons or processes without using more event structures.