DropDownListBox

DropDownListBoxes combine the features of a SingleLineEdit and a ListBox.

The sample shows a blank input field and below it a list of sample choices such as Actors and Cinematography. To the right of the list are up and down arrows with a vertical scroll bar between them.

There are two types of DropDownListBoxes:

Noneditable boxes

If you want your user to choose only from a fixed set of choices, make the DropDownListBox noneditable.

In these boxes, the only valid values are those in the list.

There are several ways for users to pick an item from a noneditable DropDownListBox:

Editable boxes

If you want to give users the option of specifying a value that is not in the list, make the DropDownListBox editable by selecting the AllowEdit check box on the General tab page.

With editable DropDownListBoxes, you can choose to have the list always display or not. For the latter type, the user can display the list by clicking the down arrow.

Populating the list

You specify the list in a DropDownListBox the same way as for a ListBox. For information, see “ListBox”.

Specifying the size of the drop-down box

To indicate the size of the box that drops down, size the control in the Window painter using the mouse. When the control is selected in the painter, the full size—including the drop-down box—is shown.

Other properties

As with ListBoxes, you can specify whether the list is sorted and whether the edit control is scrollable.

For more information, right-click in any tab page in the Properties view and select Help from the pop-up menu.