[Overview][Types][Classes][Procedures and functions] Reference for unit 'contnrs' (#fcl)

TComponentList.IndexOf

Search for an instance in the list

Declaration

Source position: contnrs.pp line 107

public function TComponentList.IndexOf(

  AComponent: TComponent

):Integer;

Arguments

AComponent

  

Instance to look for.

Function result

Index of the found instance

Description

IndexOfsearches for an instance in the list and returns it's position in the list. The position is zero-based. If no instance is found, -1 is returned.

IndexOfjust overrides the implementation of the parent class so it accepts only TComponentinstances. It introduces no new behaviour.

Errors

None.

See also

TObjectList.IndexOf

  

Search for an object in the list