ImageEn, unit iexUserInteractions

TIEPdfViewerInteraction.FindNext

TIEPdfViewerInteraction.FindNext


Declaration

function FindNext(ReverseDir: Boolean = False): Boolean;
function FindNext(out CharIndex, Count: Integer; ReverseDir: Boolean = False; DoSelect: Boolean = True): Boolean;


Description

Call after Find to locate the next instance of the searched text.
Use the second overload to retrieve information about the location position, and optionally for non-visual searches.
Parameter Description
CharIndex The starting position of the searched text
Count The length of the found text
ReverseDir Works backward to return previous found entries
DoSelect If enabled, the instance is marked in the document. If False, the search is non-visual

Result is False if there are no further instances of the searched text.

Notes:
- You can use ClearSelection to clear the selected text
- To access the screen position of the text, use GetTextRects


Demo

Demo  Demos\Other\PdfViewer\PdfViewer.dpr


Examples

ImageEnView1.PdfViewer.FindNext();

// Find previous instance
ImageEnView1.PdfViewer.FindNext( True );

// Get the location of the "Adobe" (non-visual)
ImageEnView1.PdfViewer.Find( 'Adobe', False, False, False );
ImageEnView1.PdfViewer.FindNext( idx, cnt, False, False );
ShowMessage( format( 'Index: %d, Count: %d', [ idx, cnt ]);


See Also

- CanFindNext
- Find
- ClearSelection