Description
Associates an action with the push button that will be executed at the specified event.
Applies to
Syntax
long AddAction(PDFFormFieldEvent actionEvent, PDFAction action)
Argument |
Description |
---|---|
actionEvent |
The event that triggers the action. actionEvent is of the PDFFormFieldEvent data type, supporting these values: PDFFormFieldEvent_Up! PDFFormFieldEvent_Down! PDFFormFieldEvent_Enter! PDFFormFieldEvent_Exit!. |
action |
The action to be executed. |
Return value
Long. Returns 1 if it succeeds. If an error occurs, returns the Error Codes. Otherwise, returns null.
Examples
The following example triggers the SaveAs action at the event PDFFormFieldEvent_Down!.
PDFformfieldpushbutton lpdf_pushbutton PDFactionnamed lpdf_named lpdf_pushbutton = create PDFformfieldpushbutton lpdf_named = create PDFactionnamed lpdf_named.menuname = "SaveAs" lpdf_pushbutton.addaction(PDFFormFieldEvent_Down!,lpdf_named)
See also