findAgain

findAgain(direction: Integer): Integer;

The findAgain method of the JadeTextEdit class searches for the match text and parameter values reused from the most recent find, findMarkAll, or replaceAll method.

The findAgain method continues searching in the specified direction, skipping the selected text. In the direction parameter, specify -1 to search backwards towards the top of the text editor or specify zero (0) or +1 to search forwards towards the bottom of the text editor.

The matching text is selected in the text editor, the caret is positioned at the end of the matched text (that is, the selection), and the character position at which the text was found is returned. If no match was found, this method returns -1.

The method in the following example shows the use of the findAgain method.

mnuEditFindNext_click(menuItem: MenuItem input) updating;
vars
    findpos : Integer;
begin
    findpos := jteSource.findAgain(0);
    if findpos < 0 then
        app.msgBox(" No matching text", "Find Next",0);
    endif;
end;