Example Code

Using Keyboard to Switch Between Tab Control Pages

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

Switch between tabs using the keyboard.

 

Description

LabVIEW represents a tab control as a single item in the front panel window. Typically, you can switch between individual pages using the mouse. This VI allows the user to switch between pages using the keyboard controls <Page Up> and <Page Down>. The VI uses an Event structure to cycle through the pages of the tab control. A Key Down event controls tabbing through the pages of a tab control. The <Page Up> key increments the tab pages and the <Page Down> key decrements the tab pages.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Select the Run button.
2. Use the "Page Up", or "Page Down" keys to switch tabs.
3. Use the Stop button to finish the execution.

 

Additional Information or References

Capture.PNG

Product Support Engineer
National Instruments

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