PDFium Component Docs

WordBoxIndexAtCharIndex function

Unit: PDFium
Kartottaa FTextPage-merkkihakemiston sitä sisältävään TPdfWordBoxiin

Syntax

function WordBoxIndexAtCharIndex(const Words: TPdfWordBoxes; CharIndex: Integer): Integer;

Parameters

WordsTPdfWordBoxes
CharIndexInteger

Return Value

Integer

Description

WordBoxIndexAtCharIndex palauttaa nollapohjaisen sanalaatikkoindeksin, jonka StartIndex ja Count sisältävät pyydetyn merkkihakemiston, tai -1, kun mikään sana ei vastaa

Käytä tulosta valitaksesi, mikä TPdfWordBox tulisi korostaa tai valita TTS-kohdistimen edetessä

Remarks

Example

Index := WordBoxIndexAtCharIndex(Words, PdfView1.CurrentCharIndex);
if Index >= 0 then
  PdfView1.SelectWordBox(Words[Index]);

See Also

BuildWordBoxes, TPdfView.PageWordBoxes, TPdfView.SelectWordBox, TPdfView.SetReadingHighlight