PDFium Delphi Component Docs

ClearFormSelectionRects method

Component: TPdf  ·  Unit: PDFium
Clears the accumulated form selection rectangles

Syntax

procedure ClearFormSelectionRects;

Description

ClearFormSelectionRects empties the list returned by FormSelectionRects so the next reported rectangle starts a fresh accumulation

Call it whenever the focused field changes or before repainting selection overlays to avoid drawing stale rectangles

Remarks

    • The OnFormSelectionRect event keeps firing for new rectangles after the clear
    • This operates only on the copied rectangle list; the native selection itself is untouched

Example

Pdf1.ClearFormSelectionRects;
PdfView1.Invalidate;

See Also