FocusAt
Forms, interaction, input
Description
Hit-tests one visual page point of a TPDFlibFormSession and focuses the returned Widget
The point uses the same visual top-left based coordinates as HitTest, after page rotation and in the library's current measurement units
The focus change itself runs through FocusField, so the previous edit is committed or cancelled and the /Bl and /Fo actions follow the normal trigger path
The call returns 0 when the point hits no Widget or the focus transition is rejected
Declaration
function FocusAt(Page: Integer; X, Y: Double;
CommitCurrent: Boolean = True): Integer;
Parameters
| Page | One-based page number containing the point |
|---|---|
| X, Y | Visual page point with the origin at the visual top left |
| CommitCurrent | True commits the active edit before the transition, False cancels it |
Return value
Returns 1 when a Widget was hit and focused, otherwise 0
See also
HitTest, FocusField, FocusNext, GetFieldPageRect, DispatchInputEvent, TPDFlibFormSession