ActivateFormField

Form fields, viewer interaction

Description

Dispatches the field's action for the given trigger event to the OnFormFieldAction handler instead of executing it inside the control

The action is looked up on the widget first and then on its base field; push buttons and signature widgets are dispatched even when they carry no action so the host can implement their click behaviour, and no action is interpreted or executed by the viewer itself, in particular JavaScript actions are handed over as typed data

Syntax

Delphi

Function TPDFlibViewer.ActivateFormField(FieldIndex: Integer; Const TriggerEvent: WideString= 'U'): Integer;

Parameters

FieldIndexOne-based form field index
TriggerEventPDF trigger event letter, the default 'U' stands for mouse-up

Return values

0No handler is assigned to OnFormFieldAction, the field index is invalid, or no action exists for a field type other than push button and signature
1The activation was handed to the OnFormFieldAction handler

See also

TPDFlibViewer, BeginEditFormField, FocusNextFormField, FocusedFormFieldIndex