HitTest
Forms, interaction, input
Description
Returns the topmost visible Widget of a TPDFlibFormSession that contains one visual page point
The point uses visual top-left based coordinates after page rotation and is inclusive of the rectangle edges
Every visible Widget is tested, including the kid Widgets of fields with multiple kids, which are addressed through their temporary Widget indexes
Candidate rectangles rank by their tab order value, and equal ranks resolve to the later enumerated Widget so later entries in the page /Annots array act as the frontmost hit
Declaration
function HitTest(Page: Integer; X, Y: Double): Integer;
Parameters
| Page | One-based page number containing the point |
|---|---|
| X, Y | Visual page point with the origin at the visual top left |
Return value
Returns the field or temporary Widget index at the point, or 0 when no library is attached, the page or point is invalid or no Widget contains the point
See also
FocusAt, GetFieldPageRect, GetTabSequence, DispatchInputEvent, TPDFlibFormSession