PDFium Delphi Component Docs

GetFocusableAnnotationSubtypes methode

Component: TPdf  ·  Unit: PDFium
Geeft de annotatie-subtypes terug die de form fill-omgeving momenteel als focusbaar behandelt

Syntaxis

function GetFocusableAnnotationSubtypes: TPdfAnnotationSubtypes;

ResultTPdfAnnotationSubtypes. Dynamische array van de focusbare subtypes; leeg wanneer de lijst is gewist

Beschrijving

Leest de focuslijst terug die de form fill-omgeving bijhoudt — de lijst die bepaalt welke annotaties toetsenbordfocus kunnen ontvangen, en dus waar navigatie-aanroepen zoals FocusFormField doorheen stappen

De leesoperatie vergt twee native rondes: eerst het aantal (FPDFAnnot_GetFocusableSubtypesCount), daarna de waarden (FPDFAnnot_GetFocusableSubtypes), elk terug gedecodeerd naar een TPdfAnnotationSubtype. Wanneer het aantal nul is, is het resultaat een lege array in plaats van een fout

De aanroep vereist een geladen document en een geïnitialiseerde form fill-omgeving; wanneer formulieren niet zijn geïnitialiseerd, verhoogt het een EPdfError met de melding Form fill environment is not initialized. Een mislukte native query verhoogt Cannot retrieve focusable annotation subtypes. Wijzig de lijst met SetFocusableAnnotationSubtypes

Voorbeeld

var
  Subtypes: TPdfAnnotationSubtypes;
  Subtype: TPdfAnnotationSubtype;
begin
  Subtypes := Pdf1.GetFocusableAnnotationSubtypes;
  for Subtype in Subtypes do
    Memo1.Lines.Add(GetEnumName(TypeInfo(TPdfAnnotationSubtype),
      Ord(Subtype)));
end;

Zie ook

SetFocusableAnnotationSubtypes, FocusFormField, FocusedFormFieldIndex, FormField