FindNext

Description

Finds the next occurrence of text in the control and highlights it, using criteria set up in a previous call of the Find function.

Applies to

RichTextEdit controls and DataWindow controls whose content has the RichTextEdit presentation style

Syntax

controlname.FindNext ( )

Argument

Description

controlname

The name of the RichTextEdit or DataWindow control whose contents you want to search


Return value

Integer.

Returns the number of characters found. FindNext returns 0 if no matching text is found and -1 if the DataWindow's presentation style is not RichTextEdit or an error occurs.

Examples

This example searches the RichTextEdit rte_1 for text the user specifies in the SingleLineEdit sle_search. The search proceeds forward from the cursor position, is case insensitive, and is not limited to whole words:

integer li_charsfound
li_charsfound = rte_1.Find(sle_search.Text, &
      TRUE, TRUE, FALSE, TRUE)

A second button labeled FindNext would have a script like this:

rte_1.FindNext()

See also

Find