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

# TCustomTabControl.OnGetImageIndex

Event handler signalled to get the image index for a tab on the tabbed control.

## Declaration

Source position: comctrls.pp line 496

`public property TCustomTabControl.OnGetImageIndex : TTabGetImageEvent read FOnGetImageIndex write FOnGetImageIndex;`

## Description

OnGetImageIndex is a TTabGetImageEvent property with the event handler signalled to get the ordinal position for the image displayed for the specified tab. It is signalled (when assigned) from the GetImageIndex method, and allows the application to override the value assigned to the ImageIndex property in a page object (TCustomPage).

The Sender argument is the object (TCustomTabControl) for the event notification.

TabIndex contains the ordinal position for a tab/page which is visible on the tabbed control.

ImageIndex is a variable argument used to return the position in Images for the bitmap displayed on the specified tab. Return -1 in the argument value if an image is not available in Images or not needed for the tab.

## See also

TCustomTabControl.Images |  | Contains the images displayed on the tabs for the control.
TCustomTabControl.Page |  | Provides indexed access to the page objects used on the tabbed control.
TCustomTabControl.GetImageIndex |  | Gets the ordinal position for the image displayed on the tab for the specified page.
TCustomPage.ImageIndex |  | Ordinal position for the image associated with the page.
TTabGetImageEvent |  | Specifies an event handler type used to get the position in an image list for the image on a tab.