API:System.Contnrs.TComponentList.RemoveItem
Delphi
function RemoveItem(AComponent: TComponent; ADirection: TList.TDirection): Integer; inline;
C++
HIDESBASE int __fastcall RemoveItem(System::Classes::TComponent* AComponent, System::Types::TDirection ADirection);
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | public | System.Contnrs.pas System.Contnrs.hpp |
System.Contnrs | TComponentList |
Description
Removes an item from the list. {{#multireplace:System.Contnrs.TComponentList.RemoveItem|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:System.Classes.TList.RemoveItem|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. All content below this line refers to {{#multireplace:System.Classes.TList.RemoveItem|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.
Removes an item from the list.
The RemoveItem method removes a specified item from the list. Because the search of the item is linear, it is an O(n) operation on a list with n entries. If the item is not found, -1 is returned.