FormFieldAtPagePoint

Form fields, viewer interaction

Description

Returns the one-based form field covering the given point on a page, preferring widget kid indices over their parent fields because the kids carry the real rectangle and appearance state

Hidden fields and parent or unknown nodes are skipped, later annotations take precedence because they paint on top, and the hit test accepts the band on either side of the field top so both vertical origin conventions work

Syntax

Delphi

Function TPDFlibViewer.FormFieldAtPagePoint(APage: Integer; XPos, YPos: Double): Integer;

Parameters

APageOne-based page index
XPos, YPosPoint in top-down page user-space coordinates

Return values

0No visible form field covers the point or no library is loaded
Positive valueOne-based index of the covering field or widget kid

See also

TPDFlibViewer, GetFieldPageRect, LinkActionAtPagePoint, RegionAtClientPoint