ImageEn, unit iexPdfiumCore

TPdfAnnotationList.HighlightedIndex

TPdfAnnotationList.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


Demo

Demo  Demos\PDF\PDFAnnotations\PdfAnnotations.dpr


Example

// Select the clicked annotation
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.Objects.FindAnnotationAt( pt );
  if idx > -1 then
  begin
    ImageEnView1.PdfViewer.Annotations.HighlightedIndex := idx;
    ImageEnView1.Invalidate();
  end;
end;