Skip to main content
Table of Contents

TTMSFNCListEditor.XYToItem Method

Returns the zero-based index of the chip at the given pixel coordinates, or -1 if none.

API unit family: TMSFNCListEditor Declaring type: TTMSFNCListEditor Inherited from: TTMSFNCCustomListEditor

Syntax

FMX.TMSFNCListEditor.hppPascalC++
function XYToItem(X, Y: Single; Overflow: Boolean = False): Integer;
int __fastcall XYToItem(float X, float Y, bool Overflow = false);

Parameters

Name Description
X Horizontal pixel coordinate relative to the control.
Y Vertical pixel coordinate relative to the control.
Overflow When True, extends the hit-test area beyond the chip boundaries.

Returns

Zero-based index of the chip under the cursor, or -1 if no chip is at that position.