Example Code

Use Combo Box to Programmatically Display Controls Using LabVIEW

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

Demonstrate to arrange front panel objects visibility depends on the combo box.

 

Description

The Combo Box control is set up like an Enumerated control in that the values of the items are zero-indexed numeric values.  This is done to use less code to process which controls should be made visible/invisible.  If this is changed, a case structure would need to be added to change the indexing of the 2-D array of control references.  Additionally, a System Ring or System Enum control could be used in place of the Combo Box.

 

Requirements

Software:

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

1. Run the VI.

2. Adjust Combo box item to make a visible different set of front panel objects.

 

Additional Information or Resources

 

snip2012.png

 

 

 

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

 

 

Alex Person
NI-RIO Product Support Engineer
National Instruments

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