Topic: How to use Find and Replace of RTF Control in Code
Hello everybody
How to use find and replace command of RichText Control in Code?
Thanks for your time.
My Visual Database → Script → How to use Find and Replace of RTF Control in Code
Hello everybody
How to use find and replace command of RichText Control in Code?
Thanks for your time.
Dmitry ,Please help.
Thanks.
//procedure for replace string
procedure ReplaceStrRich(RichEdit: TdbRichEdit; FromText, ToText: string);
begin
if Form1.RichEdit1.SearchText(FromText, False, False) then Form1.RichEdit1.InsertText(ToText, False)
else if Form1.RichEdit1.SearchText(FromText, False, True) then Form1.RichEdit1.InsertText(ToText, False);
end;
// how to use
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
ReplaceStrRich(Form1.RichEdit1, 'Hello', 'Bye');
end;
Thanks so much.
My Visual Database → Script → How to use Find and Replace of RTF Control in Code
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi