Example Code

Get String from Listbox in 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

Demonstrates how to access Listbox strings using Property Node.

 

Description

The example uses Property Node to get Item Names property in a 1D array of string of the Listbox. The selected string in the Listbox returns the position of the string in the array. Index Array is used to return the element in the array.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the program
  2. Click on any string inside the Listbox
  3. The string selected and its position will be displayed
  4. Click "Stop Button" to stop the program

 

Additional Information or Resources

VI Block Diagram

 

BD.png

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

George T.
Senior Applications Engineer
National Instruments UK and Ireland

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