Complete the following steps to create a multicolumn listbox.

  1. Add the multicolumn listbox control to the front panel window.
  2. To add an option item, use the Labeling tool to type in a cell in the leftmost column.
  3. Type in the cells in the same row to add information about each option item.
  4. (Optional) Set the selection mode of a multicolumn listbox.
  5. (Optional) Change the color of the symbols and the color of the headers and cells.
  6. 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 add header text to a multicolumn listbox, show and hide multicolumn listbox headers, and add rows and columns to a multicolumn listbox.