Example Code

Blink Tabs to Draw User Attention

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
There are times when you would like to alert the user that there is important information or that they need to take an action on a tab that is not currently displayed.  This code demonstrates how to blink a tab until the user selects the blinking tab. 


Description
This code uses a functional global variable to control the current state of each tab.  The FGV will contains information about which tab control to blink, which tabs are blinking, and the actual blinking.  An event structure in the top level code controls the rate at which the FGV is called (250 ms by default).  The event structure is also used to control which tabs the user wants to blink.  This implementation is for demonstration only.  Implementation in a final application will almost certainly be more sophisticated. 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Open and Run the Blink Tab Host.vi
  2. Change the number in the Blink This Tab Observe that tab start blinking
  3. Click on the blinking tab to stop the blinking.
  4. Click Stopto exit the VI.

 

Additional Information or References
VI Block Diagram

Block Diagram.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Applications Engineer
National Instruments

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