Creating a Multicolumn Listbox Control
- 已更新2026-05-29
- 閱讀時間為 2 分鐘
Creating a Multicolumn Listbox Control
Use a multicolumn listbox control in LabVIEW to display selectable items on the front panel along with metadata about those items. Use a Case Structure on the block diagram to create code that handles selections in the listbox.
Use a multicolumn listbox instead of a standard listbox if you need to give users additional information about the selection items in a table-style format.
To create a multicolumn listbox, complete the following steps.
- Add a multicolumn listbox control to the front panel window from .
- Add a listbox item: use the Labeling tool to type in a cell in the leftmost column and press the Enter key.
- Add information for users about the item: type in the cells in the same row.
- Repeat steps 2 and 3 for each item you want to enter in the listbox.
- Optional: Set the number of items a user can select in the multicolumn listbox.
- Optional:
Add symbols to the
items in the listbox.
In a multicolumn listbox, LabVIEW adds the symbol to the first column.
- Optional: Change the color of the symbols and the color of the headers and cells.
-
Create a
Case Structure on the block diagram to handle the selected
item with conditional code for each item.
How a listbox control behaves on the block diagram depends on the selection mode for the listbox.
Selection Mode Block Diagram Behavior 0 or 1 Item or 1 Item Listbox control appears as a 32-bit signed integer. 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.
0 or More Items or 1 or More Items Listbox control appears as an array of 32-bit signed integers. The value(s) in the array represent the currently selected item(s). If no item is selected, the value is an empty array.
You can configure multicolumn listboxes further: