function GetFocusableAnnotationSubtypes: TPdfAnnotationSubtypes;
| Result | TPdfAnnotationSubtypes dynamic array ของ subtype ที่ focus ได้ จะว่างเปล่าเมื่อรายการถูกล้างไปแล้ว |
อ่าน focus list ที่ form fill environment ดูแลอยู่กลับมา — รายการที่กำหนดว่า annotation ใดรับ keyboard focus ได้ และการเดิน navigation อย่าง FocusFormField จะเหยียบผ่านอะไรบ้าง
การอ่านต้องวิ่งไปฝั่ง native สองรอบ: รอบแรกถามจำนวน (FPDFAnnot_GetFocusableSubtypesCount) รอบถัดมาถามค่า (FPDFAnnot_GetFocusableSubtypes) แล้วถอดกลับเป็น TPdfAnnotationSubtype ทีละตัว เมื่อจำนวนเป็นศูนย์ ผลลัพธ์จะเป็นอาร์เรย์ว่าง ไม่ใช่ error
การเรียกต้องการเอกสารที่โหลดแล้วและ form fill environment ที่ initialize แล้ว หากฟอร์มยังไม่ถูก initialize จะเกิด EPdfError พร้อมข้อความ Form fill environment is not initialized และถ้าคิวรีฝั่ง native ล้มเหลวจะเกิด Cannot retrieve focusable annotation subtypes การแก้รายการให้ใช้ SetFocusableAnnotationSubtypes
var
Subtypes: TPdfAnnotationSubtypes;
Subtype: TPdfAnnotationSubtype;
begin
Subtypes := Pdf1.GetFocusableAnnotationSubtypes;
for Subtype in Subtypes do
Memo1.Lines.Add(GetEnumName(TypeInfo(TPdfAnnotationSubtype),
Ord(Subtype)));
end;