To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates a method for:
Description
Sometimes, as part of a User Interface it may be useful to be able to control the active page on a Tab Control through a separate Boolean control.
This problem encompasses a number of smaller tasks which must first be overcome, such as how to programmatically link a set of buttons to a set of tabs and how to differentiate from buttons used for control of your tabs and buttons used for some other task.
This code takes a standard approach of using an event structure to manipulate the tab control's state using enumerations, however an extra step is incorporated to enable the controlling button to remain highlighted - this gives the user a visual cue that the current button pressed is related to the current tab selected. Additionally, if the user choses an alternative tab directly on the tab, it will highlight the corresponding button.
In order to give another level of visual cue, the Boolean controls have had their visual appearance modified to be more obvious when in their True state. This is done through the properties menu for the Boolean, under the Appearance tab and in the Colors option section for the On state.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet of Button State Example.vi
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.