Sign in Join
FPDoc Onlineexperiment

TCollectionItem class

In unit Classes

Basic object that is managed by a TCollection class.

Declaration

pascal
TCollectionItem = class(TPersistent)

Inheritance

  1. TCollectionItem
  2. TPersistent
  3. TObject

Descends from it: TCheckConstraint TConditionalString TCookie TCoolBand TCustomWebAction TDaemonDef TDependency TDialogButton TFlowPanelControl TFPExprIdentifierDef TGridColumn THeaderSection THTTPRoute TIniCollectionItem TListColumn TListControlItem TMediatorDef TMediatorFieldInfo TMimeItem TModuleItem TNamedItem TNamedItem TNotifyEventItem TParam TPropertyMapItem TRequestInterceptorItem TSqlObjectIdenfier TStatusPanel TStoredValue TStreamCollectionItem TTaskDialogBaseButtonItem TTemplateVar TUploadedFile TZipFileEntry

Description

TCollectionItem and TCollection form a pair of base classes that manage a collection of named objects. The TCollectionItem is the named object that is managed, it represents one item in the collection. An item in the collection is represented by three properties: DisplayName, Index and ID.

A TCollectionItem object is never created directly. To manage a set of named items, it is necessary to make a descendant of TCollectionItem to which needed properties and methods are added. This descendant can then be managed with a TCollection class. The managing collection will create and destroy it's items by itself, it should therefore never be necessary to create TCollectionItem descendants manually.

See also

Properties

CollectionpublicPointer to the collection managing this item.
IDpublicInitial index of this item.
IndexpublicIndex of the item in its managing collection property.
DisplayNamepublicName of the item, displayed in the object inspector.

Methods

SetCollectionprotected
ChangedprotectedMethod to notify the managing collection that the name or index of this item has changed.
GetOwnerprotectedReturns the managing collection.
GetDisplayNameprotectedReturns the of the collectionitem.
SetIndexprotectedWrite method for the property.
SetDisplayNameprotectedWrite method for the property.
CreatepublicCreates a new instance of this collection item.
DestroypublicDestroys this collection item.
GetNamePathpublicReturns the namepath of this collection item.

Inherited

From TPersistent (6)

Assign AssignTo DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers

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.