PDFium Delphi Component 文件

FormSelectionRects 属性

组件: TPdf  ·  单元: PDFium
列出表单层为聚焦字段报告的选择矩形

语法

property FormSelectionRects: TPdfFormSelectionRects read GetFormSelectionRects;

说明

FormSelectionRects 返回自上次清除以来表单层报告的累积 TPdfFormSelectionRect 数组;每个条目携带从 1 开始的 PageNumber 和页面空间的 Bounds

连续重复的矩形会被抑制,因此数组中每个不同的选择矩形只包含一个条目

备注

    • 矩形随用户更改选择而累积;在绘制叠加层之前调用 ClearFormSelectionRects 重置
    • 每个新矩形还会通过 OnFormSelectionRect 实时通告
    • getter 返回一个副本,因此调用方拥有返回的数组

示例

for R in Pdf1.FormSelectionRects do
  DrawFocusRing(R.PageNumber, R.Bounds);

参见