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

# TCoolBand.ImageIndex

Ordinal position for the image displayed for the band.

## Declaration

Source position: comctrls.pp line 2520

`published property TCoolBand.ImageIndex : TImageIndex read FImageIndex write SetImageIndex default - 1;`

## Description

ImageIndex is a TImageIndex property which contains the ordinal position for the image displayed for the band. The value refers to the position in the Images property in TCoolBar where the image is stored. The default value for the property is -1 and indicates an image has not been assigned for the band.

Changing the value for the property causes the Changed method to be called to update the item in the bands collection in the parent control.

ImageIndex is used (when assigned) in the CalcControlLeft method when the positions for the image and text, and horizontal spacing are calculated for the band. It is also used when the preferred width and height are calculated for the band. It is used in the Paint method in TCustomCoolBar when the icon for the band is drawn.

## See also

TCoolBand.CalcControlLeft |  | Calculates the left coordinate for the Control in the band.
TCoolBand.CalcPreferredHeight |  | Calculates the band height using the orientation and settings in the parent control.
TCustomCoolBar.Images |  | Contains images displayed on the bands for the control.
TCustomCoolBar.Paint |  | Draws the visible bands for the control on its Canvas.
TImageIndex |  | Type used for an image list index (integer).