Page 1 of 1

Find and Replace in documents with SRVControls

Posted: Fri Feb 21, 2020 6:38 pm
by mcperes
if not editor1.srv.StartEditing(Editor) then
exit;
editor1.srv.CanUpdate := False;
editor1.srv.ActiveEditor.SetSelectionBounds(
0, editor1.srv.ActiveEditor.GetOffsBeforeItem(0),
0, editor1.srv.ActiveEditor.GetOffsBeforeItem(0));
while (editor1.srv.ActiveEditor.SearchText(InSearch,[
RVEdit.TRVESearchOption.rvseoDown])) do
editor1.srv.ActiveEditor.InsertText(InReplace, False);
editor1.srv.CanUpdate := True;

(editor1 is a frame and srv is a TSRichViewEdit)

can't find the text in documents with SRVControls

Re: Find and Replace in documents with SRVControls

Posted: Fri Feb 21, 2020 7:27 pm
by Sergey Tkachenko
Searching in inserted controls is not implemented yet.

Find and Replace in documents with SRVControls

Posted: Fri Jul 31, 2020 11:51 am
by GeraldLom
If I manually add new text to a link and then delete the old text, the link is maintained, but not with "Find and replace", the link is deleted even though the text color says the link is still present. Can this be find and replace be modified to maintain the link since I have 1600 links that I would like to change the names of?

Re: Find and Replace in documents with SRVControls

Posted: Fri Jul 31, 2020 5:28 pm
by Sergey Tkachenko
Do you mean that when you replace a hyperlink text, its target (i.e. the link's tag) is lost?
I cannot reproduce this problem.
Can you create a simple project to reproduce it?