RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TComponentList.Add Method

Inserts a component at the end of the list.

Pascal
function Add(AComponent: TComponent): Integer;
C++
__fastcall int Add(TComponent * AComponent);

Call Add to insert a component at the end of the list. Add places the component after the last item, even if the array contains nil (Delphi) or NULL (C++) references, and returns the index of the inserted component. (The first component in the list has an index of 0.) 

Add increments Count and, if necessary, allocates memory by increasing the value of Capacity. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!