TReplaceDialog
From Free Pascal wiki
Jump to navigationJump to searchTReplaceDialog is a component that aids in search and replace textinformation. It can be found on the Dialogs tab of the Component Palette.
Usage
procedure TMyForm.Button1Click(Sender: TObject);
begin
ReplaceDialog1.Execute();
end;
procedure TMyForm.ReplaceDialog1Replace(Sender: TObject);
var
src: String;
k: integer;
pos: TPoint;
begin
with Sender as TReplaceDialog do begin
if frReplace in Options then begin
if TSynEdit1.SearchReplaceEx( FindText, ReplaceText, [ssoReplace], pos ) then begin
TSynEdit1.SetFocus();
end else
Beep();
end else if frReplaceAll in Options then begin
if TSynEdit1.SearchReplaceEx( FindText, ReplaceText, [ssoReplaceAll], pos ) then begin
TSynEdit1.SetFocus();
end else
Beep();
end;
end;
end;
See also