penso che devi aggiungere un pezzo di codice
sull'evento onfind del componente finddialog devi assegnare il nome della procedura da eseguire:
FindDialog1Find
poi aggiungi questo codice
codice:
procedure TFrmAgenda.FindDialog1Find(Sender: TObject);
var
st: TSearchTypes;
newpos: integer;
cd: TFindDialog;
begin
cd := (Sender as TFindDialog);
if frMatchCase in cd.Options then
st := st+[stMatchCase];
if frWholeWord in cd.Options then
st := st+[stWholeWord];
if RichEdit1.SelLength > 0 then
RichEdit1.SelStart := RichEdit1.SelStart + 1;
newpos := RichEdit1.FindText(cd.FindText,
RichEdit1.SelStart,
Length(RichEdit1.Text),
st);
if newpos <> -1 then
begin
RichEdit1.SetFocus ;
RichEdit1.SelStart := newpos;
RichEdit1.SelLength := Length(cd.FindText);
end
else
begin
MessageDlg('Raggiunta la fine del documento.',mtInformation,[mbOK],0);
RichEdit1.SelStart := 0;
end;
end;
e fammi sapere