Skip to main content

TcxListBox.ItemAtPos(TPoint,Boolean) Method

Returns the index of the item located at the specified point.

Declaration

function ItemAtPos(const APos: TPoint; AExisting: Boolean): Integer;

Parameters

Name Type
APos TPoint
AExisting Boolean

Returns

Type
Integer

Remarks

You can use the ItemAtPos method to determine the item located under the specified point. The point is specified relatively to the top-left corner of the control via the APos parameter. The AExisting parameter specifies the return value if the specified point is below the last item. If this parameter value is True, the method returns -1. Otherwise, the ItemAtPos method returns the index of the last available item incremented by one.

See Also