EnsureFocusedEditor
Forms, interaction, input
Description
Internal helper of TPDFlibFormSession that guarantees an active edit before keyboard input is applied
It operates on the currently focused Widget and returns 0 when no valid field has focus
Only text fields and editable choice fields with choice type 4 qualify; other field types cannot host an editor
When that base field is already being edited the helper returns 1 directly, otherwise it starts the edit through BeginEdit
The helper backs the Ctrl+A, Backspace, Delete, arrow, Home, End, Enter and composed-text handling of DispatchInputEvent
Declaration
function EnsureFocusedEditor: Integer;
Return value
Returns 1 when an edit is active for the focused Widget, otherwise 0 when nothing valid is focused, the field cannot host an editor or BeginEdit failed
See also
DispatchInputEvent, BeginEdit, FocusField, FocusedFieldIndex, EditingFieldIndex, TPDFlibFormInputKey, TPDFlibFormSession