PDFium Delphi Component Docs

AllowFormEvents property

Component: TPdfView  ·  Unit: PDFium
Gates the mouse, keyboard and focus events the viewer forwards to the form-fill layer

Syntax

property AllowFormEvents: Boolean; // default True

Description

When True, the default, the control forwards mouse, keyboard and focus events to the PDFium form-fill layer, so form fields respond to typing and clicking as they would in a viewer

Set it to False for a read-only viewer, or when the host application drives form interaction itself through the TPdf form API rather than through direct user input

Page load and close are deliberately not gated: those initialise the form layer, so suppressing them would stop fields from rendering rather than just from reacting

With the Windows V8 runtime, full XFA text fields support keyboard selection replacement and deletion; native read-only fields keep their values, and disabling AllowFormEvents stops native input and form-editor keyboard routing

Dynamic XFA layout callbacks schedule a page-handle refresh once native input returns, keeping the displayed page and moved widget hit areas aligned and bringing the selected page back into range when pages disappear

Full XFA pages have no PDF text layer for viewer text selection or automatic URL extraction; form field input remains available with the default viewer settings

See Also

Pdf, FormField, GenerateFormAppearances, FormFill