function FocusFormFieldAt(X, Y: Double; Modifier: Integer = 0): Boolean;
| X, Y | Double. Cursor position in PDF user space, not device pixels |
| Modifier | Integer. Virtual-key modifier flags passed through to PDFium; 0 when no modifier key is held |
| Result | Boolean. True when an annotation exists at the point and holds focus |
Viewer code calls this on a mouse-down or hit-test to give a form field focus at the clicked location. If the annotation at that point already has focus nothing changes; if there is no annotation there, form focus is removed
Coordinates are in PDF user space, so a caller that starts from screen coordinates must convert them with DeviceToPage first. The page must be active and the form fill environment must be initialized, otherwise the call raises an error
This wraps FORM_OnFocus and complements the existing keyboard navigation and field inspection methods; it does not synthesize a mouse event or commit a field value