Vcl.ExtCtrls.TControlCollection.IndexOf

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IndexOf(AControl: TControl): Integer;

C++

int __fastcall IndexOf(Vcl::Controls::TControl* AControl);

Properties

Type Visibility Source Unit Parent
function public
Vcl.ExtCtrls.pas
Vcl.ExtCtrls.hpp
Vcl.ExtCtrls TControlCollection

Description

Returns the index of the first control in the Items array with a specified value.

Call IndexOf to get the index for a control in the Items array. Specify the control as the AControl parameter.

The first item in the array has index 0, the second item has index 1, and so on. If a control item is not in the list, IndexOf returns -1. If a control item appears more than once in the array, IndexOf returns the index of the first appearance.

See Also