SetFormFieldAction

フォームフィールド、注釈とホットスポットリンク

説明

既存のアクション辞書をフォームフィールドトリガーに結び付けます

構文

Delphi

Function TPDFlib.SetFormFieldAction(Index: Integer; Const ActionType: WideString; ActionID: Integer): Integer;

ActiveX

Function PDFlib::SetFormFieldAction(Index As Long, ActionType As String, ActionID As Long) As Long

タイプライブラリ バージョン 3.6 以降で IPDFlibrary5 から利用可能

DLL

int DLSetFormFieldAction(int InstanceID, int Index, const wchar_t* ActionType, int ActionID);
int DLSetFormFieldActionA(int InstanceID, int Index, const char* ActionType, int ActionID);

パラメータ

Index1 ベースのフォームフィールドインデックス
ActionTypeトリガー名。E、X、D、U、Fo、Bl、K、F、V、C のいずれか
ActionIDGetAnnotActionID、GetOutlineActionID、GetFormFieldActionID が返したアクションハンドル

戻り値

0フィールド、トリガー、アクションハンドルが不正か、PDF/X-6 モードが有効です
1アクションがコピーされ、フィールドトリガーに割り当てられました

備考

アクション辞書は、フィールドに割り当てられる前に選択されたドキュメントへコピーされるため、元のアクションへの後の編集がフィールドトリガーを変更することはありません

プライマリのマウスアップアクティベーションアクションにはActionTypeのUを使います。GetFormFieldActionID(Index, 'U')が読み取るアクションと一致します

トリガーをクリアするにはRemoveFormFieldActionを、割り当てられたアクションをTPDFlibActionInfo経由で調べるにはGetFormFieldActionInfoを使います