SetFormFieldAction
表單欄位、註解與熱點連結
描述
將現有的動作字典繫結到表單欄位觸發
語法
Delphi
Function TPDFlib.SetFormFieldAction(Index: Integer; Const ActionType: WideString; ActionID: Integer): Integer;
DLL
int DLSetFormFieldAction(int InstanceID, int Index, const wchar_t * ActionType, int ActionID);
參數
| Index | 以 1 為起始的表單欄位索引 |
|---|---|
| ActionType | 觸發名稱:E、X、D、U、Fo、Bl、K、F、V 或 C |
| ActionID | 由 GetAnnotActionID、GetOutlineActionID 或 GetFormFieldActionID 傳回的動作控制代碼 |
傳回值
| 0 | 欄位、觸發或動作控制代碼無效,或 PDF/X-6 模式作用中 |
|---|---|
| 1 | 動作已複製並指派給欄位觸發 |
備註
動作字典會在指派給欄位之前先複製到所選文件中,因此之後對原始動作的編輯不會變動欄位觸發 使用
ActionType U 作為主要的滑鼠放開啟用動作,對應 GetFormFieldActionID(Index, 'U') 所讀取的動作
使用
RemoveFormFieldAction 清除觸發,並使用 GetFormFieldActionInfo 透過 TPDFlibActionInfo 檢視已指派的動作