DropListBox

Syntax

DropListBox HorizPos, VertPos, Width, Height, ArrayVariable$(), .Identifier

Remarks

Creates a drop-down list box from which a user can select an item within a user-defined dialog box. DropListBox has the same syntax as ListBox. When a drop-down list box is dropped down, the portion that is dropped down can cover other controls in the dialog box or fall outside the dialog box.

Argument

Explanation

HorizPos, VertPos

The horizontal and vertical distance of the upper-left corner of the drop-down list box from the upper-left corner of the dialog box in increments of 1/8 and 1/12 of the System font (Windows) or the dialog font (Macintosh).

Width, Height

The width and height of the list box, in increments of 1/8 and 1/12 of the System font (Windows) or the dialog font (Macintosh). Height is the height of the list box when it is dropped down.


Argument

Explanation

ArrayVariable$()

A string array containing the items to be listed, one list box item per array element.

.Identifier

Together with the dialog record name, creates a variable whose value corresponds to the selected list box item. The form for this variable is DialogRecord.Identifier (for example, dlg.MyList).

The identifier string (.Identifier minus the period) is also used by statements in a dialog function that act on the list box, such as DlgEnable and DlgVisible.


See the ListBox entry for an example of a list box.

To modify the example so that it displays a drop-down list box instead of a list box, change the ListBox instruction to DropListBox, and change the Height argument to the height of the drop-down list box when it is dropped down.

For an example of DropListBox used in a complete dialog box definition, see Begin Dialog¼End Dialog.

See Also

Begin Dialog¼End Dialog, ComboBox, DlgListBoxArray, ListBox