Sign in Join
FPDoc Onlineexperiment

TComponentList class

In unit Contnrs

List to manage component instances.

Declaration

pascal
TComponentList = class(TObjectList)

Inheritance

  1. TComponentList
  2. TObjectList
  3. TList
  4. 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

Properties

ItemspublicIndex-based access to the elements in the list.

Methods

Notifyprotected
GetItemsprotected
SetItemsprotected
HandleFreeNotifyprotected
DestroypublicDestroys the instance.
AddpublicAdd a component to the list.
ExtractpublicRemove a component from the list without destroying it.
RemovepublicRemove a component from the list, possibly destroying it.
IndexOfpublicSearch for an instance in the list.
FirstpublicFirst non-nil instance in the list.
LastpublicLast non-nil instance in the list.
InsertpublicInsert a new component in the list.

Inherited

From TObjectList (5)

Create FindInstanceOf GetItem OwnsObjects SetItem

From TList (26)

AddList Assign Capacity Clear Contains Count Delete Error Exchange Expand FPOAttachObserver FPODetachObserver FPONotifyObservers Get GetCapacity GetCount GetEnumerator GetList Grow List Move Pack Put SetCapacity SetCount Sort

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.