procedure SetFocusableAnnotationSubtypes(const Subtypes: array of TPdfAnnotationSubtype);
| Subtypes | TPdfAnnotationSubtype 的開放式陣列。完整的取代清單;不在陣列中的任何子類型之註解都無法取得焦點。空陣列會清除此清單 |
表單填寫環境會維護一份可取得焦點的註解子類型清單。預設情況下,該清單涵蓋表單 Widget,這正是 FocusFormField 之類鍵盤導覽移動的對象。此呼叫會透過原生介面(FPDFAnnot_SetFocusableSubtypes)取代整份清單,例如讓檢視器也能聚焦自由文字或其他標記註解
每個 TPdfAnnotationSubtype 值會在呼叫前編碼為其原生值。傳入空陣列會轉送 nil 指標與零計數並清除清單,在設定新清單之前不會有任何可聚焦的項目
此呼叫要求必須已載入文件且已初始化表單填寫環境;表單未初始化時,會引發 EPdfError,訊息為 Form fill environment is not initialized。原生呼叫失敗會引發 Cannot set focusable annotation subtypes。可透過 GetFocusableAnnotationSubtypes 讀回目前的清單
begin
Pdf1.LoadFromFile('form.pdf');
// widgets stay focusable, free-text notes join them
Pdf1.SetFocusableAnnotationSubtypes([anWidget, anFreeText]);
end;