System.Contnrs.TComponentList.Add
Delphi
function Add(AComponent: TComponent): Integer; inline;
C++
HIDESBASE int __fastcall Add(System::Classes::TComponent* AComponent);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Contnrs.pas System.Contnrs.hpp |
System.Contnrs | TComponentList |
Description
Inserts a component at the end of the list.
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.