ImageEn, unit iexPdfiumCore

TPdfFormFieldList.HighlightedIndex

TPdfFormFieldList.HighlightedIndex


Declaration

property HighlightedIndex: Integer;


Description

Draw a colored rectangle around the specified annotation.

Note:
The color of the highlighting rect is specified by HighlightColor
You must call ImageEnView1.Invalidate() after setting HighlightedIndex


Example

// Select the clicked form field
procedure TfrmMain.ImageEnView1MouseDown(Sender: TObject; Button: TMouseButton;
    Shift: TShiftState; X, Y: Integer);
var
  idx: Integer;
  pt: TDPoint;
begin
  pt  := ImageEnView1.PdfViewer.ScrToPage( X, Y, True );
  idx := ImageEnView1.PdfViewer.FormFields.FindFormFieldAt( pt );
  if idx > -1 then
  begin
    ImageEnView1.PdfViewer.FormFields.HighlightedIndex := idx;
    ImageEnView1.Invalidate();
  end;
end;