Skip to main content

TcxComponentCollectionItem.GetParentComponent Method

Returns the parent component of the current item’s collection.

Declaration

function GetParentComponent: TComponent; override;

Returns

Type
TComponent

Remarks

A collection and its items have the same parent component. Use the GetParentComponent function to access the parent component of the current collection item and its collection. If the current item does not belong to any collection, the GetParentComponent function returns nil.

Call the SetParentComponent method to add the current element to a collection associated with a certain component.

See Also