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

# GetButtonImageIndex

Gets the ordinal position in the LCL Glyph image list for the specified button identifier.

## Declaration

Source position: buttons.pp line 532

`function GetButtonImageIndex(`
`idButton: TButtonImage`
`):Integer;`

## Arguments

`idButton` |  | Button identifier constant for the image requested in the routine.

## Function result

Ordinal position for the specified button identifier, or -1 when not found.

## Description

GetButtonImageIndex is an Integer function used to retrieve the position for the specified button identifier in the LCL glyph image list.

idButton is the TButtonImage value for the button identifier requested in the routine. It is used to identify the resource name in BitBtnResNames for the button glyph. The resource name is located in the LCLGlyphs image list using its GetImageIndex method.

The return value contains the ordinal position in LCLGlyphs where the corresponding resource name is stored, or -1 if the resource name is not found.

## See also

TButtonImage |  | Represents button identifiers defined in the lcltype.pp unit.
BitBtnResNames |  | Contains resource names for corresponding button identifiers in TBitBtn.
TLCLGlyphs.GetImageIndex |  | Gets the position of the specified resource.
LCLGlyphs |  | Provides access to the TLCLGlyphs instance in the implementation.