Searching and Replacing in TRichView and TRichViewEdit
The following main functions for text searching are available:
These methods search for the substring s. If found, they select it an make it visible (scroll the window to it).
The methods of TRichView start searching from the current selection (if exists) or from the first (or the last, when searching up) visible item. If rvsroFromStart is included in SrchOptions, the methods start searching from the beginning (or the end, when searching up) of the document.
The methods of TRichViewEdit start searching from the caret position.
All the methods support the following options:
▪searching up or down;
▪case sensitive/insensitive searching;
▪searching for the whole words;
▪allowing matching in a single text item or in multiple items.
s may contain a tab character (#9). However, it makes sense only if the option for matching in multiple items is set.
The unit RVMisc.pas contains the functions to convert options of search dialogs:
It's easy to implement replacing of text in editor. SearchText selects the old substring, InsertText replaces the selected string with the new one.