PDFium Delphi Component 文件

FormSelectionRects 屬性

元件: TPdf  ·  單元: PDFium
列出表單層針對焦點欄位回報的選取矩形

Syntax

property FormSelectionRects: TPdfFormSelectionRects read GetFormSelectionRects;

Description

FormSelectionRects 會傳回自上次清除以來表單層回報的 TPdfFormSelectionRect 累積陣列;每個項目都帶有自 1 起算的 PageNumber 與頁面空間的 Bounds

連續重複的矩形會被抑制,因此陣列中每個不同的選取矩形只有一個項目

Remarks

    • 矩形會隨著使用者變更選取範圍而累積;繪製覆蓋層之前,請先呼叫 ClearFormSelectionRects 重設
    • 每個新矩形也會透過 OnFormSelectionRect 即時通知
    • getter 會傳回複本,因此傳回的陣列由呼叫端持有

Example

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

See Also