Vcl.ExtCtrls.TControlCollection.IndexOf
Delphi
function IndexOf(AControl: TControl): Integer;
C++
int __fastcall IndexOf(Vcl::Controls::TControl* AControl);
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | Vcl.ExtCtrls.pas Vcl.ExtCtrls.hpp |
Vcl.ExtCtrls | TControlCollection |
Description
Renvoie l'index du premier contrôle du tableau Items contenant une valeur spécifiée.
Appelez IndexOf pour obtenir l'index d'un contrôle dans le tableau Items. Spécifiez le contrôle comme paramètre AControl.
Le premier élément du tableau possède l'index 0, le deuxième possède l'index 1, etc. Si un élément de contrôle n'est pas dans la liste, IndexOf renvoie -1. Si un élément de contrôle apparaît plusieurs fois dans le tableau, IndexOf renvoie l'index de la première occurrence.