RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomListControl.AddItem Method

Adds an item to the list control.

Pascal
procedure AddItem(Item: String; AObject: TObject); virtual; abstract;
C++
virtual __fastcall AddItem(AnsiString Item, TObject * AObject) = 0;

AddItem adds an item to the end of the list, possibly associating it with a specified object. 

Item is the text that is the item's value. This is the string that appears for the item in the list control. 

AObject is an object that you can associated with the item. Note that the list control does not take ownership of this object. That is, if you delete the item, the corresponding object is not freed. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!