From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Navigate Tab Control with Custom Buttons

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.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example shows how to use custom buttons to make the user interface look unique.

 

Description

These code consist on navigating through tabs with created custom controls. The examples are very simplified proof of concept that can be used to make much higher complex codes. On the first example, we turned off the default tab selector, by right-clicking on the tab control and choosing Properties. On the Appearance page uncheck Show page selector. However, we are still using a tab control.

 

Now, in order to take advantage on LabVIEW's components, we can create custom radio buttons. The second example shows how we can use these.


Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI
2. Use the buttons at the left, and verify that the intended tab is selected
3. Use the Stop button to finish execution

 

Additional Information or References

Capture.PNG

 

 

 

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

Comments
Photon_Dan
Active Participant Active Participant
Active Participant
on

Customized radio buttons would work well for this.  That way you wouldn't have to use local variables to set the non-selected buttons false.  Also, you would need only one event case to capture the Value Change of the radio button.

Christina_R
Active Participant
Active Participant
on

I agree, this is a good place to use a radio button cluster. Many people don't know that you can put any Boolean controls into a radio button cluster and they will behave like radio buttons (i.e. when one is toggled to TRUE the others will automatically go to FALSE).


Christina Rogers
Principal Product Owner, LabVIEW R&D
Bunni
Member
Member
on

How would you add more tab pages to this?  I tried adding a radio button and a tab page and it gave an error about wire enumeration conflict.

sapt1998
Member
Member
on

@Bunni

I also have the same problem. How to fix this anyone?