|
...implement Find and Replace dialogs |
Top Previous Next |
|
Find The key method is TRichView.SearchText or TRichViewEdit.SearchText, Search can be case sensitive or not, up or down. "Whole word" option is also supported. You can convert options from Find dialog to SrchOptions parameter of these methods using GetRVSearchOptions or GetRVESearchOptions. Replace Use TRichViewEdit.SearchText to select the old string. Then use InsertText to replace it with the new one. This method removes the selected part of document before performing insertion. If you search in backward direction, set CaretBefore parameter to True. Examples Demos: Find dialog is implemented in the main editor demo:
Both Find and Replace dialogs are implemented in the demo:
Alternatively, you can use RichViewActions. |