Combo Boxes

From RAD Studio
Jump to: navigation, search

Go Up to List Controls


A combo box (TComboBox) combines an edit box with a scrollable list. When users enter data into the control--by typing or selecting from the list--the value of the Text property changes. If AutoComplete is enabled, the application looks for and displays the closest match in the list as the user types the data.

Three types of combo boxes are: standard, drop-down (the default), and drop-down list.

To create a combo box

  1. Set the Style property to select the type of combo box you need:
    • Use csDropDown to create an edit box with a drop-down list. Use csDropDownList to make the edit box read-only (forcing users to choose from the list).
    • Use csOwnerDrawFixed or csOwnerDrawVariable to create owner-draw combo boxes that display items graphically or in varying heights. For information on owner-draw controls, see Adding Graphics to Controls.
    • Use csSimple to create a combo box with a fixed list that does not close. Be sure to resize the combo box so that the list items are displayed.
  2. Set the DropDownCount property to change the number of items displayed in the list.

See Also