List Box

Usage | Design-relevant Attributes | Related Controls

The list box is a box that displays a list of items where users can select one item from. If the number of items exceeds the box size, a vertical scrollbar is activated. The list box is read-only.
Figure 1: Example of the list box control.

top Top


Usage

A list box offers a set of choices from which a user can select one item. If the number of items exceeds the control size, a vertical scrollbar is activated. An item in the list box is called list box item. The list box is read-only.

Note: The list box control does not render a descriptive label automatically. Use the label control to add a description. See there, how you can change text attributes if you need to highlight the label, for example, make it bold (see figure 1).

Choosing the Appropriate Selection Control

A list box is similar in function to a dropdown list box - both offer a list of items where users can select one item from, that is, both are single-selection lists.

See Forms - Using Different List Types for guidelines on choosing the appropriate selection control.

Note: For very small item numbers (2-6) and if the users should see all alternatives, use radio buttons.

top Top


Design-Relevant Attributes

You can set the number of displayed lines of a list box (size), its width (width), and whether it is enabled or disabled (Boolean attribute disabled).

See page Control API for List Box for details.

top Top


Related Controls

Dropdown List Box, Item List, Radio Button, Table View, Tree View

top Top