System.Classes.TOwnedCollection

From RAD Studio API Documentation
Jump to: navigation, search

System.Classes.TCollectionSystem.Classes.TPersistentSystem.TObjectTOwnedCollection

Delphi

TOwnedCollection = class(TCollection)

C++

class PASCALIMPLEMENTATION TOwnedCollection : public TCollection

Properties

Type Visibility Source Unit Parent
class public
System.Classes.pas
System.Classes.hpp
System.Classes System.Classes

Description

TOwnedCollection is a collection that maintains information about its owner.

Each TOwnedCollection holds a group of TCollectionItem descendants.

TOwnedCollection extends TCollection by maintaining information about its owner. Knowledge of the TOwnedCollection owner lets the Object Inspector display the collection's name at design time. Notice that:

  • Classes that descend directly from TCollection must implement the GetOwner method if they are to appear in the Object Inspector. Typical descendants see in the TCollection class.
  • By descending from TOwnedCollection, the derived class does not need to add anything in order to appear in the Object Inspector, because TOwnedCollection implements the GetOwner method.

The following table lists some typical descendants of TOwnedCollection with the corresponding TCollectionItem descendant and the component that uses each pair:

TOwnedCollection descendant TCollectionItem descendant Component

TCustomMultiResBitmap

TCustomBitmapItem

TImage

TFieldDefs

TFieldDef

TDataSet

TIndexDefs

TIndexDef

TClientDataSet

TWorkAreas

TWorkArea

TListView

TTaskDialogButtons

TTaskDialogButtonItem

TTaskDialog

TCellCollection

TCellItem

TGridPanel

TControlCollection

TControlItem

TGridPanel

TListControlItems

TListControlItem

TStaticListAction

TRecipientCollection

TRecipientItem

TSendMail

TActionListCollection

TActionListItem

TActionManager

TActionBars

TActionBarItem

TActionManager

See Also