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

# TCoolBands.FindBand

Gets the collection item which contains the specified control.

## Declaration

Source position: comctrls.pp line 2544

`public function TCoolBands.FindBand(`
`AControl: TControl`
`):TCoolBand;`

## Arguments

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

## Function result

TCoolBand instance with the specified control, or Nil when not found.

## Description

FindBand iterates over the values in Items to locate the TCoolBand instance which contains the control specified in AControl. The return value is the TCoolBand instance in the collection, or Nil if AControl is not used in one of the collection Items.

Use FindBandIndex to get the ordinal position in the collection for the collection item which contains a specified control.

## See also

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