Using DropDownListBoxes

DropDownListBoxes combine the features of a SingleLineEdit and a ListBox.

NoteSmartphone platforms ListBoxes and DropDownListBoxes are converted to spinner controls when you deploy them to a Smartphone device or emulator. Edit functions for spinner controls are not supported. For more information about spinner controls, see Appendix D, “Designing Applications for Windows CE Platforms.”

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 this type of DropDownListBox, the only valid values are those in the list.

The SIP keyboard as well as peripheral keyboards can be used to select items from the list in a deployed application when the DropDownListBox has focus. Users can make selections from the list box by:

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 properties page.

With an editable DropDownListBox, you can choose whether to have the list always display or not. If you do not choose to always display an editable list, the user can still display the list in the deployed application by tapping (Pocket PC device) or clicking (emulator) the down arrow.

Populating the list

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

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.