COMBOBOX control

Defines a combination box control (a combo box). A combo box consists of either a static text box or an edit box combined with a list box. The list box can be displayed at all times or pulled down by the user. If the combo box contains a static text box, the text box always displays the selection (if any) in the list box portion of the combo box. If it uses an edit box, the user can type in the desired selection; the list box highlights the first item (if any) that matches what the user has entered in the edit box. The user can then select the item highlighted in the list box to complete the choice. In addition, the combo box can be owner-drawn and of fixed or variable height.

COMBOBOX id, x, y, width, height [, style [, extended-style]]


Control styles. This value can be a combination of the COMBOBOX class styles and any of the following styles: WS_TABSTOP, WS_GROUP, WS_VSCROLL, and WS_DISABLED.

If you do not specify a style, the default style is CBS_SIMPLE | WS_TABSTOP.

The height parameter applies to the height of a combo box with a drop-down list fully expanded.

For more information about the general syntax of a control statement, see Common Control Parameters.


This example defines a combo-box control with a vertical scroll bar:


See also

Combo Boxes