From RAD Studio API Documentation
Jump to: navigation, search



TComboBox = class(TCustomComboBox)


class PASCALIMPLEMENTATION TComboBox : public TCustomComboBox


Type Visibility Source Unit Parent
class public
FMX.ListBox FMX.ListBox


A TComboBox is a button with a list box attached to it.

Click the button to display the list. You can select an item from the list and it will appear as the button's text. You cannot type text directly into the combo box button.

To add items, right-click the combo box on the form and choose Add Item. This creates a new TListBoxItem object that appears in the Structure pane and can be edited individually. You can also manage the items in the combo box by double-clicking the combo box control in the Form Designer. This opens the Items Designer dialog where you can add, delete, and change the order of the items.

Note: When a number of items in a control is more than can be concurrently shown in the TListBoxItem list box, then you can use the scroll bar to scroll the items shown in the list box. Notice that on Windows the scroll bar is shown by default. However, on OS X the scroll bar is not shown by default. On OS X, the scroll bar appears when you try to scroll items using the mouse wheel. To enforce the scroll bar to be shown by default, you can use the code like following:
ComboBox1.ListBox.AniCalculations.AutoShowing := false;

In Windows 8 style applications, you can create a Windows 8 style combo box by setting the value Native for the property DropDownKind. For more information, see Creating a Metropolis UI ComboBox.

See Also

Code Examples