# List Box Controls

> Source: https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/overview

List Box controls allow users to select items from a displayed list. By default, users make one selection from a preassigned list of items. A predefined **[Data Class](https://manual.pvxplus.com/data-dictionary/data-classes/overview)** can also be applied to a List Box control.

When creating a List Box control, the style of the List Box is determined by the *List Box Type* property. When a *List Box Type* is selected, the design properties to be specified for that particular style of List Box are displayed. See **[List Box Type](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type)**.

The List Box types that are supported in NOMADS are:

| **List Box Type** | **Description** | **Example** |
| --- | --- | --- |
| **[Standard](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type#standard)** | Lists a single column of data, with no formatting options.<br>A **[Drop Box](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/drop-box-control/overview)** uses a similar format. | ![](https://manual.pvxplus.com/migration-assets/cf8990919c01e8785e3cd658915fe50a231fc54ae8e9455b38b963a52aea4591.png) |
| **[Formatted](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type#formatted)** | Displays multiple data elements over multiple columns with formatting and color. | ![](https://manual.pvxplus.com/migration-assets/ce379eb10b455e52724497a5c740259c061c8840117cb780ada70ff5fc55b584.png) |
| **[List View](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type#listview)** | Displays a single element of data over multiple columns (optionally may include bitmaps). | ![](https://manual.pvxplus.com/migration-assets/841df1bea5ae5bf5b42021eb07823c0f4609859297871bc5c631f9698a5732fc.png) |
| **[Report View](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type#reportview)** | Displays multiple data elements in different columns (similar to a *Formatted* List Box) and allows column headings, sorting, bitmaps and other formatting attributes. | ![](https://manual.pvxplus.com/migration-assets/53ecb0437884b1c740a9cea710d5e719b4f2c1816f1846100460d163dafd1ffa.png) |
| **[Tree View](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type#treeview)** | Displays data grouped into a tree-like structure that optionally may include **+** *(plus)* and **-** *(minus)* buttons to expand tree levels, dotted lines and **[State Indicators](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type#stateindicators)**. | ![](https://manual.pvxplus.com/migration-assets/3754b7827eaf5fb49954fc8abe57700dafb84a860090a90caedd7b1fecceabd1.png) |

## Creating a List Box

To draw a new List Box on your panel, select the List Box control tool from the **[Controls Toolbar](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/drawing-and-modifying-panel-objects/controls-toolbox)**. Hold down the left-mouse button and drag the mouse to create a rectangle to the desired size. Release the mouse button to create the new object.

A List Box control can also be created from a ***data class*** or a data dictionary ***element***. See **[Data Class Controls](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/introduction#Mark4)** and **[Data Element Controls](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/introduction#Mark5)**.

For making other adjustments, see **[Modifying Objects](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/drawing-and-modifying-panel-objects/modifying-objects)**.

A system popup menu consisting of extraction, search and print options can also be added to any Grid or List Box (except Tree Views). See **[List Box and Grid System Popup Menu](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/popup-menu/list-box-and-grid-system-popup-menu)**.

Different functionality is available depending on the *List Box Type*. For example, a *Standard* List Box could allow users to input their own values if the *Allow Variable Input* attribute is set. To allow more than one selection in a List Box, select the *Multiple Selections* check box. To define the specific attributes for the new control, see **[List Box Type](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type)**.

For information and examples on the use of ***dynamic data classes*** and ***dynamic control properties***, see **[Dynamic Control Properties](https://manual.pvxplus.com/data-dictionary/data-classes/dynamic)**.

## Loading Data Elements

Once a List Box is created, it can be loaded using **LIST_BOX LOAD** syntax in your program code. **[Smart Controls](https://manual.pvxplus.com/nomads-graphical-application/smart-controls/overview)** can also be used to simplify this process by auto-loading data based on query definitions. Use the Auto Load property to set this feature (if activated).

You can programmatically retrieve or set a selected item in a List Box, using the variable with the same name as the control. See **[Accessing and Manipulating Controls](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/event-handler-routines/accessing-and-manipulating-controls)**.

## See Also

**[Variable List Box](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/variable-list-box)**  
**[LIST_BOX Directive](https://manual.pvxplus.com/directives/list-box#Mark3)**
