PDFium Component Docs

เมธอด FocusNextFormField

Component: TPdfView  ·  Unit: PDFium
ทำงานร่วมกับเคอร์เซอร์โฟกัสเชิงตรรกะของ AcroForm บนหน้าปัจจุบันสำหรับเวิร์กโฟลว์คีย์บอร์ด เสียงพูด และการเข้าถึง

Syntax

function FocusNextFormField: Integer;

Return Value

Integer ดัชนีฟิลด์ที่ได้รับโฟกัสใหม่ หรือ -1 เมื่อไม่สามารถโฟกัสฟิลด์ใดได้

Description

The form-focus members maintain a logical cursor over AcroForm widget annotations on the current page. The cursor follows FormFieldTabOrder and returns -1 when no current-page field is focused

Use these members when an application needs to walk fields from code, drive voice-assisted form filling, or expose the active field to an accessibility layer without relying on mouse hit testing

Remarks

Example

if Pdf1.FormFieldCount > 0 then
  Pdf1.FocusFormField(0);
ShowMessage(Pdf1.FocusedFormFieldText);

See Also

FormField, FormFieldCount, FormFieldInfo, FormFieldTabOrder, FocusedFormFieldIndex