[Overview][Types][Classes][Procedures and functions] Reference for unit 'contnrs' (#fcl)

TComponentList.Add

Add a component to the list.

Declaration

Source position: contnrs.pp line 104

public function TComponentList.Add(

  AComponent: TComponent

):Integer;

Arguments

AComponent

  

The component to add.

Function result

Index at which the component was added.

Description

Addoverrides the Addoperation of it's ancestors, so it only accepts TComponentinstances. It introduces no new behaviour.

The function returns the index at which the component was added.

Errors

If not enough memory is available to expand the list, an exception may be raised.

See also

TObectList.Add