PDFium Delphi Component Docs

OnFormSelectionRect händelse

Component: TPdf  ·  Unit: PDFium
Utlöses för varje markeringsrektangel som formulärlagret rapporterar

Syntax

property OnFormSelectionRect: TPdfFormSelectionRectEvent read FOnFormSelectionRect write FOnFormSelectionRect;

Description

OnFormSelectionRect utlöses en gång för varje distinkt markeringsrektangel som formulärlagret rapporterar för det fokuserade fältet. Hanteraren tar emot en TPdfFormSelectionRect med ett ettbaserat PageNumber och Bounds i sidkoordinater

Dubbletter i följd undertrycks; varje rapporterad rektangel läggs också till i listan som FormSelectionRects exponerar

Remarks

    • Hanterarsignatur: procedure(Sender: TObject; const SelectionRect: TPdfFormSelectionRect) of object
    • Använd händelsen för omedelbar överläggsritning och FormSelectionRects för omritningar i batch
    • Anropa ClearFormSelectionRects när fokus flyttas till ett annat fält

Example

procedure TMain.Pdf1FormSelectionRect(Sender: TObject; const SelectionRect: TPdfFormSelectionRect);
begin
  HighlightSelection(SelectionRect.PageNumber, SelectionRect.Bounds);
end;

See Also