PDFium Delphi Component Docs

CurrentCharIndex 屬性

元件: TPdfView  ·  單元: PDFium
保留供相容性使用的應用程式選取字元索引(預設 0)

語法

property CurrentCharIndex: Integer; // default 0

說明

讀寫檢視上由應用程式管理的字元索引(預設為 0)。指派這個屬性只會儲存整數值,不會觸發重繪,也不會變更目前的文字選取

若要在執行階段對滑鼠游標下的字元做命中測試,請呼叫 PdfView1.CharacterIndexAtPos,或以 DeviceToPage 轉換用戶端座標後查詢 Pdf.CharacterIndexAtPos

備註

範例

begin
  Memo1.Lines.Add(IntToStr(PdfView1.CurrentCharIndex));
  PdfView1.Active := True;
  Memo1.Lines.Add(IntToStr(PdfView1.CurrentCharIndex));
end;

另請參閱

Active, Pdf, Options, Zoom