Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Creating Listboxes

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Complete the following steps to create a listbox.

  1. Add a listbox control to the front panel window.

  2. Use the Labeling tool to enter an item name in the listbox and press the <Enter> key.
  3. Repeat step 2 for each item you want to enter in the listbox.
  4. (Optional) Set the number of items a user can select in the listbox.
  5. Create a Case structure to handle the selected item. A listbox with a selection mode set to 0 or 1 Item or to 1 Item appears on the block diagram as a 32-bit signed integer. You can right-click a tree control on the front panel and select Selection Mode»Data Type from the shortcut menu to change the data type. The data value for a single-selection listbox is a number that represents the currently selected option. The first item in the list has a value of zero. If no item is selected, the value is –1.

    A listbox with a selection mode set to 0 or More Items or to 1 or More Items appears on the block diagram as an array of 32-bit signed integers, where the value(s) in the array represent the currently selected item(s). If no item is selected, the value is an empty array.

You also can use the ListBox properties to add items to a listbox and to configure a listbox programmatically.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit