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

# TCustomListBox.GetIndexAtY

Gets the index position for the item at the specified vertical coordinate.

## Declaration

Source position: stdctrls.pp line 619

`public function TCustomListBox.GetIndexAtY(`
`Y: Integer`
`):Integer;`

## Arguments

`Y` |  | The vertical client coordinate.

## Function result

The item index, -1 if no item could be found.

## Description

Calls GetIndextAtXY to get the return value using the vertical coordinate in Y. The value 1 is used as the horizontal coordinate.

## See also

TCustomListBox.GetIndexAtXY |  | Gets the index for the item at the given client coordinates.