Just curious since the search and replace with the srichview needs to be done programmatically, is there a better/simpler way to search and replace all of a select text with my text?
Here is the search and replace code:
Code: Select all
rveDoc.RichViewEdit.SetSelectionBounds(0, rveDoc.RichViewEdit.GetOffsBeforeItem(0), 0, rveDoc.RichViewEdit.GetOffsBeforeItem(0));
if rveDoc.RichViewEdit.SearchText(InSearch,[RVEdit.TRVESearchOption.rvseoMatchCase,
RVEdit.TRVESearchOption.rvseoDown, RVEdit.TRVESearchOption.rvseoMultiItem]) then
begin
rveDoc.RichViewEdit.InsertText(InReplace, False);
while (rveDoc.RichViewEdit.SearchText(InSearch,[RVEdit.TRVESearchOption.rvseoMatchCase,
RVEdit.TRVESearchOption.rvseoDown, RVEdit.TRVESearchOption.rvseoMultiItem,
RVEdit.TRVESearchOption.rvseoSmartStart])) do
begin
rveDoc.RichViewEdit.InsertText(InReplace, False);
end;
end;