Search and Replace text in Header
Posted: Sun Jun 26, 2016 3:33 am
i have the srichview working with loading an rtf and the do a search and replace but how do i get it to search and replace info in the header.
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:
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;