BeginEditFormField

Form fields, viewer interaction

Description

Opens the in-place editor over a text or choice field, positioned on the field's on-screen rectangle at the current zoom, scroll and view rotation; an already open editor commits first. The editor kind follows

GetFormFieldEditorKind, so text flags select a single-line, multiline, password or comb editor while choice flags select a list, multi-select list, fixed combo or editable combo; the editor is prefilled with the current field value and adopts the field's MaxLen and alignment, and its font colour comes from FormTextColorEnter commits single-line editors, Ctrl+Enter commits multiline editors, Escape cancels and Tab moves to the next field; the field must not be read-only and the control must have a window handle

Syntax

Delphi

Function TPDFlibViewer.BeginEditFormField(FieldIndex: Integer): Integer;

Parameters

FieldIndexOne-based form field index

Return values

0The field is not an editable text or choice field, is read-only, has no resolvable page rectangle, or the control has no window handle
1The editor was created and focused, and the field became the edited and focused field

See also

TPDFlibViewer, CommitInplaceEditor, GetFormFieldEditorKind, EditingFieldIndex, FormTextColor