System.Contnrs.TComponentList.Extract

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Extract(Item: TComponent): TComponent; inline;

C++

HIDESBASE System::Classes::TComponent* __fastcall Extract(System::Classes::TComponent* Item);

Properties

Type Visibility Source Unit Parent
function public
System.Contnrs.pas
System.Contnrs.hpp
System.Contnrs TComponentList

Description

Removes a component from the list.

Call Extract to remove a component from the list. After the component is removed, all the components that follow it are moved up in index position and Count is decremented.

Extract does not free the component when it is removed from the list. This differs, for example, from the Delete method, which frees the component unless OwnsObjects is set to false.

To remove the reference to a component without deleting the entry from the Items array and changing the Count, set the Items property for Index to nil (Delphi) or NULL (C++).

See Also