To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI shows how to use key navigation in concordance with a tab control.
Description
Tab Controls can be a very useful way of organizing the controls and indicators of your front panel. However, they can be frustrating when using Key Navigations for certain controls. This example shows how to update the Key Navigation for two buttons on separate tabs so that they can both react to F1 based on which one is the active tab. In this example, I've used an Event Structure to determine when we switch between tabs. When this occurs, I set the button on the current tab to toggle when the F1 key is pressed. I've also set the indicators at the bottom left to react to button presses on each page.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
1. Download "Key Navigation lv2012 - NI Verified.vi"
2. Click on the Run Arrow
3. Notice that you can click on the OK button within each tab to toggle the Page One or Page Two Booleans. When you switch between the tabs, both Booleans reset
4. You can also press F1 to toggle the OK Button
Additional Information or References
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.