TFindDialog
From Free Pascal wiki
Jump to navigationJump to searchTFindDialog is a component that aids in finding information. It can be found on the Dialogs tab of the Component Palette.
To activate a FindDalilog, just call its Execute() function. Create an OnFind method to perform the actual find.
Usage
procedure TMyForm.Button1Click(Sender: TObject);
begin
FindDialog1.FindText := 'findme';
FindDialog1.Execute();
end;
procedure TMyForm.FindDialog1Find(Sender: TObject);
var
src: String;
k: integer;
begin
with Sender as TFindDialog do begin
src := ReplaceDialog1.FindText;
k := Pos( src, Memo1.Lines.Text );
if k>0 then begin
Memo1.Selstart := k;
Memo1.SelLength := length( src );
end else
Beep();
end;
end;
See also