DispatchAction
Forms, interaction, input
Description
Internal helper of TPDFlibFormSession that runs one Widget trigger action through the OnAction host callback
The action is looked up with GetFormFieldActionInfo for the passed index, and a temporary Widget index without its own action entry falls back to the base field's action
Invalid indexes and fields without a matching action report True because there is nothing to veto
When an action exists, the callback receives the typed TPDFlibFormFieldActionInfo together with the trigger name and a mutable Allow flag, and the helper returns that decision so callers abort the pending operation on a veto
Declaration
function DispatchAction(FieldIndex: Integer;
const TriggerEvent: AnsiString): Boolean;
Parameters
| FieldIndex | Field or temporary Widget index whose action should run |
|---|---|
| TriggerEvent | PDF trigger name such as Fo, Bl, E, X, D, U, V, F or K |
Return value
Returns True when the operation may proceed, False when the OnAction handler vetoed it
See also
FocusField, Blur, ApplySelectionEdit, CommitEdit, TPDFlibFormSessionActionEvent, GetFormFieldActionInfo, TPDFlibFormFieldActionInfo, TPDFlibFormSession