From RAD Studio API Documentation
Jump to: navigation, search



TListBox = class(TCustomListBox)


class PASCALIMPLEMENTATION TListBox : public TCustomListBox


Type Visibility Source Unit Parent
class public
FMX.ListBox FMX.ListBox
TListBox Shown on iOS Platform


A TListBox displays a set of items in a scrollable list.

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.

With the TListBox you can:

  • Set the list to accept single-item selection or multi-item selection using the MultiSelect property.
  • Attach check boxes to the list items by using the ShowCheckboxes property.
  • Set different backgrounds for consecutive list items by using the AlternatingRowBackground.
Note: When a number of items in a control is more than can be concurrently shown in the control, then you can use the scroll bar to scroll the items shown in the control. 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:
ListBox1.AniCalculations.AutoShowing := false;

See Also

Code Examples and Samples