SetFormFieldActionA
表單欄位、註解與熱點連結
描述
結尾的 A 表示 ANSI(char)DLL 進入點;ActiveX/COM 介面只提供 Unicode 形式。行為與 SetFormFieldAction 完全相同,字串參數依目前 SetAnsiMode 的字碼頁解讀
將既有的動作字典綁定到表單欄位觸發器
語法
Delphi
Function DLSetFormFieldActionA(InstanceID, Index: Integer; ActionType: PAnsiChar; ActionID: Integer): Integer;
DLL
int DLSetFormFieldActionA(int InstanceID, int Index, const char * ActionType, int ActionID);
參數
| Index | 從 1 開始的表單欄位索引 |
|---|---|
| ActionType | 觸發器名稱:E、X、D、U、Fo、Bl、K、F、V 或 C |
| ActionID | 由 GetAnnotActionID、GetOutlineActionID 或 GetFormFieldActionID 傳回的動作控制代碼 |
傳回值
| 0 | 欄位、觸發器或動作控制代碼無效 |
|---|---|
| 1 | 動作已複製並指派給欄位觸發器 |
備註
動作字典會先複製進所選文件再指派給欄位,因此之後對原始動作的編輯不會影響欄位觸發器
主要滑鼠放開啟用動作請用 ActionType U,對應 GetFormFieldActionID(Index, 'U') 讀到的動作
清除觸發器用 RemoveFormFieldAction;透過 TPDFlibActionInfo 檢視指派的動作用 GetFormFieldActionInfo