SetFormFieldActionEventName

Form fields, Destinations and actions

Description

Binds an existing action to a form-field event using a readable event name instead of a PDF trigger code

Syntax

Delphi

Function TPDFlib.SetFormFieldActionEventName(Index: Integer; Const EventName: WideString; ActionID: Integer): Integer;

Parameters

Index1-based form-field index
EventNameReadable name such as MouseUp, MouseDown, Enter, Exit, Focus, Blur, KeyPress, BeforeFormatting, Change, or Calculate
ActionIDExisting action handle returned by an annotation, outline, form-field, or action helper

Return values

Returns 1 on success, or 0 if the field, event name, or action handle is invalid

Remarks

The action is copied into the selected document before it is assigned to the field trigger

See also

SetFormFieldAction, SetFormFieldActionEvent, SetFormFieldJavaScriptEventName