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

TComponentList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

List to manage component instances.

Declaration

Source position: contnrs.pp line 94

type TComponentList = class(TObjectList)

protected

  procedure Notify(); override;

  function GetItems();

  procedure SetItems();

  procedure HandleFreeNotify();

public

  destructor Destroy; override;

  

Destroys the instance

  function Add();

  

Add a component to the list.

  function Extract();

  

Remove a component from the list without destroying it.

  function Remove();

  

Remove a component from the list, possibly destroying it.

  function IndexOf();

  

Search for an instance in the list

  function First;

  

First non-nil instance in the list.

  function Last;

  

Last non-nil instance in the list.

  procedure Insert();

  

Insert a new component in the list

  property Items: TComponent; default; [rw]

  

Index-based access to the elements in the list.

end;

Inheritance

TComponentList

  

List to manage component instances.

|

TObjectList

  

List to manage object instances.

|

TList

|

TObject

Description

TComponentList is a TObjectList descendent which has as the default array property TComponents instead of objects. It overrides some methods so only components can be added.

In difference with TObjectList, TComponentList removes any TComponent from the list if the TComponent instance was freed externally. It uses the FreeNotification mechanism for this.

See also

#rtl.classes.TList

TFPObjectList

  

TFPList descendent which manages objects.

TObjectList

  

List to manage object instances.

TClassList

  

List of classes.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.