FindNext method (DataWindows)
Description
Finds the next occurrence of text in a RichTextEdit DataWindow
control and highlights it, using criteria set up in a previous call
of the Find method.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control |
Syntax
[PowerBuilder]
1 |
integer <span>dwcontrol</span><span>.</span><span>FindNext </span>( ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control containing |
Return Values
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.
Usage

For use with PowerBuilder RichTextEdit controls, see FindNext
in the PowerScript Reference.
Examples
This example searches the DataWindow control dw_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:
1 |
integer li_charsfound |
1 |
li_charsfound = dw_1.Find(sle_search.Text, & |
1 |
true, true, false, true) |
A second button labeled Find Next would have a script
like this:
1 |
dw_1.<span>FindNext</span>() |