Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxListBox.AddItem(string,TObject) Method

Adds a new item to the list box control.

#Declaration

Delphi
procedure AddItem(AItem: string; AObject: TObject);

#Parameters

Name Type
AItem string
AObject TObject

#Remarks

Use the AddItem method to add a new item to the list. The AItem parameter represents the caption of the added item. The AObject parameter can contain any data associated with it.

If the list is not sorted (the Sorted property value is False), the item is added to the end of the collection. Otherwise, it is inserted to the appropriate place that preserves the sort order.

Note

this method is not in effect when the list box is in virtual mode. The current mode is specified by the ListStyle property.

See Also