From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Reading the Values and Item Names From a Combo Box

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
This code allows the user to read the values from a combo box programmatically without user input.


Description
This code was developed as an example to programmatically change the way combo box values and item names were read from.  With this example all values and item names from the combo box are available to read and use at will.

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Configure the combo box with item names and values
  2. Run the program
  3. Use the index control to view the selected value and item name
  4. Observe values changing in relation to the index selection
  5. Click the 'Stop' button when complete.

 

Additional Information or References
VI Block Diagram

 1.png

 

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

 

 

Bobby Breyer
Applications Engineer
National Instruments

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