repeat // ON REPETE CE CODE...
ToEnd : = Length(Text) - StartPos;
StartPos := FindText(Edit1.Text,StartPos+1,ToEnd,[stMatchCase]); // Recherche le mot contenu dans Edit1.Text dans le Memo à partir du (StartPos+1)ème caractère
if StartPos <> -1 then begin // Si on a trouvé quelque-chose
SelStart : = StartPos;
SelLength := Length(Edit1.Text);
SelAttributes.Color := clRed; // On colore le texte
end;
until StartPos =-1; // ...JUSQU'A CE QUE StartPos VAILLE -1, C'EST A DIRE QUE LE MOT N'A PAS (OU PLUS) ETE TROUVE DANS LE MEMO
end;
end;
end;
@+
Bonne Prog'
Nico [www.ni69.new.fr]
<hr size="2" width="100%">
N'oubliez pas de cliquer sur Réponse acceptéelorsque la réponse vous convient !