RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TComponentList.Extract Method

Removes a component from the list.

Pascal
function Extract(Item: TComponent): TComponent;
C++
__fastcall TComponent * Extract(TComponent * Item);

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++). 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!