ImageEn, unit iexPdfiumCore

TPdfObjectList.HighlightedIndex

TPdfObjectList.HighlightedIndex


Declaration

property HighlightedIndex: Integer;


Description

Draw a colored rectangle around the specified object.

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


Example

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