# Drop Box Control

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

A Drop Box control is similar to a **[Standard](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/list-box-controls/list-box-type#standard)** List Box; however, the default state only displays a single line of text. The remaining list is available by clicking the drop-down arrow.

![](https://manual.pvxplus.com/migration-assets/8b2f1792918f9c52f5c80a4987b99a7fa8f71271fc98c41a445fbd51f96451ae.png)The illustration on the left shows the same Drop Box control, first in its default state and then in its expanded state to show all the elements.

By default, users can make one selection from a pre-assigned list of items. To allow users to input their own values, select the *Allow Variable Input* attribute. See **[Drop Box Properties](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/drop-box-control/drop-box-properties#attributes)**.

A Drop Box takes a smaller amount of space on the screen than a comparable List Box. In addition, PxPlus automatically supplies vertical scrollbars if the number of elements overflows the size of the Drop Box.

Combine these features to optimize the screen design, particularly when display space is at a premium. A predefined **[Data Class](https://manual.pvxplus.com/data-dictionary/data-classes/overview)** can also be applied to a Drop Box control.

## Creating a Drop Box

To draw a new Drop Box on your panel, select the Drop 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 Drop 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)**.

To define the specific attributes for the new control, see **[Drop Box Properties](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/drop-box-control/drop-box-properties)**.

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 in a Drop Box

Once created, a Drop Box can be loaded using **DROP_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 Drop 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 Drop Box](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/drop-box-control/variable-drop-box)**  
**[DROP_BOX Directive](https://manual.pvxplus.com/directives/drop-box#Mark3)**
