THPDFLoadedFormField Class
Wraps a loaded AcroForm field so applications can inspect geometry and field behaviour whilst reading or updating values, names, options and read-only state
Declaration
THPDFLoadedFormField = class(TObject)
Unit
HPDFDoc
Members
| Name | Purpose |
|---|---|
Index | Zero-based form field index in the loaded document |
Name | Gets or changes the fully qualified AcroForm field name |
FieldType | Returns the detected loaded field kind as THPDFLoadedFormFieldType |
Description | Returns the field tooltip or description text stored in the loaded form |
Flags | Returns the raw AcroForm /Ff bit mask |
MaxLength | Returns the text field /MaxLen value or zero when absent |
PageIndex | Returns the zero-based page containing the field widget |
Required, NoExport | Expose common AcroForm field behaviours |
Multiline, Password | Expose common text-field behaviours |
GetBounds | Returns the field widget rectangle when available |
Value | Gets or sets the current field value through the owning THotPDF instance |
ReadOnly | Gets or sets the loaded field read-only flag |
OptionCount | Returns the number of option entries available for choice fields |
OptionValue | Returns an option value by zero-based option index |
Usage notes
- The returned object forwards changes to the owning
THotPDFinstance - Free the wrapper when the field update is complete
- Use
OptionCountandOptionValuewhen enumerating combo box, list box or radio button choices from a loaded document - Use
Name,ValueandReadOnlyfor wrapper-style edits when code already works with a loaded field object instead of direct field-name calls - Use
PageIndexandGetBoundsto build Viewer hit testing and field property panels without walking PDF dictionaries