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

# TToolButton.ImageIndex

Ordinal position in an image list for the icon displayed on the tool button.

## Declaration

Source position: comctrls.pp line 2208

`published property TToolButton.ImageIndex : TImageIndex read FImageIndex write SetImageIndex stored IsImageIndexStored default - 1;`

## Description

ImageIndex is a TImageIndex property with the ordinal position in an image list for the icon displayed on the tool button. It refers to a position in Images, HotImages, or DisabledImages in the parent tool bar. The default value for the property is -1, and indicates that an image has not been specified for the tool button. Changing the value for the property causes the tool button to be redrawn.

The property value may be changed in the CopyPropertiesFromMenuItem method when a MenuItem is assigned to the tool button.

ImageIndex is used in the Paint method to select the icon drawn on the tool button.

## See also

TToolButton.Paint |  | Draws the tool bar button to the Canvas for the control.
TToolButton.GetCurrentIcon |  | Gets the image list, index, and drawing effect for the icon on the tool button.
TToolButton.MenuItem |  | Contains a menu item associated with the tool button.
TToolButton.CopyPropertiesFromMenuItem |  | Copies properties from the specified menu item.
TToolBar.Images |  | List with images displayed when a tool button is enabled.
TToolBar.HotImages |  | List with images displayed when a button is "hot" or hovered.
TToolBar.DisabledImages |  | List with images displayed when a tool button is not enabled.