System.Contnrs.TComponentList.Extract

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

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 (Object Pascal) or NULL (C++).

See Also