[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TCoolBands.FindBandIndex

Gets the ordinal position for the collection item which contains the specified control.

## Declaration

Source position: comctrls.pp line 2546

`public function TCoolBands.FindBandIndex(`
`AControl: TControl`
`):Integer;`

## Arguments

`AControl` |  | Control to locate in the collection items.

## Function result

Ordinal position for the collection item with the specified control, or -1 when not found.

## Description

FindBandIndex is an Integer function used to get the ordinal position for the collection item which contains the control specified in AControl. FindBandIndex iterates over the values in Items to locate the TCoolBand instance whose Control property is the control specified in AControl. The return value is the position in the Items, or -1 if AControl is not used in one of the collection Items.

Use FindBand to get the collection item which contains a specified control.

## See also

TCoolBands.Items |  | Provides indexed access to the TCoolBand instances in the collection.
TCoolBands.FindBand |  | Gets the collection item which contains the specified control.
TCoolBand |  | Implements a band displayed on the TCoolBar control.