Autor Beitrag
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Mi 02.02.05 17:53 
wie kann ich eine zeile in roter schrift und eine zeile in grüner schrift dem RichEdit hinzufügen

ausblenden Delphi-Quelltext
1:
2:
3:
4:
//...
RichEdit1.Lines.Add('Fehler'); //diese zeile sollte rot hinzugefügt werden 
RichEdit1.Lines.Add('OK'); //diese zeile sollte grün hinzugefügt werden
//...


Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Moderiert von user profile iconKlabautermann: Topic aus Off Topic verschoben am Mi 02.02.2005 um 18:41
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Mi 02.02.05 20:24 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
//...
with RichEdit1 do
 begin
  SelStart:= Length(RichEdit1.Text);
  SelAttributes.Color:= clRed;
  Lines.Add('Fehler');
  SelAttributes.Color:= clGreen;
  Lines.Add('OK');
  end;
//...


sollte gehen :roll:

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)
Harry M. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: Mi 02.02.05 21:17 
jo funtz daaaankeeee..