Forum: Sonstige Fragen zu Delphi
Delphi
by Sharky,
13. Apr 2004
Hai,
mal aus dem Kopf:
procedure TForm1.Button1Click(Sender: TObject);
begin
RichEdit1.Lines.Add(Edit1.Text); //Word in RichEdit einfügen
RichEdit1.SelStart := Pos (Edit1.Text,RichEdit1.Text)-1; //Position des Wortes bestimmen
RichEdit1.SelLength := Length (Edit1.Text); //Länge festelegen
RichEdit1.SelAttributes.Color := clRed; //Das Word rot färben
Forum: Sonstige Fragen zu Delphi
Delphi
by Sharky,
13. Apr 2004
Hai XeRo,
dich Schlüsselwörter dürften .SelStart,.SelLength und .SelAttributes sein.
In der Hilfe zu SelAttributes ist sogar ein Beispiel.