Autor Beitrag
I_Z_U_A_L
Hält's aus hier
Beiträge: 15



BeitragVerfasst: So 11.05.03 09:36 
Hallo zusammen,

die Frage ist wahrscheinlich sehr leicht doch ich finde diese simple Information nicht über Delphi Hilfe ;(

Ich will zur Laufzeit die Schriftfarbe verändern können, und zwar in einer bestimmten Zeile.

Es wäre nett wenn Jemand mir einen Beispiel Posten würde.

danke sehr !

i_z_u_a_l

wenn bloß alles so leicht währe wie IntToStr 

Moderiert von user profile iconTino: Absätze entfernt.
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: So 11.05.03 10:04 
Hi,
ob es in einer bestimmten Zeile geht weis ich nicht ... aber die Farbe zur Laufzeit ändern geht mit
ausblenden Quelltext
1:
RichEdit1.Font.Color := clred;					


Die Frabe ändert sich in dem Fall in Rot :)

MfG BungeeBug
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: So 11.05.03 11:29 
Hallo!
für die ganze Zeile geht das so:
ausblenden Quelltext
1:
2:
3:
RichEdit1.SellAttributes.Font.Color :=  clRed;
RichEdit1.Lines.Add(deinText);
RichEdit1.SellAttributes.Font.Color :=  clBlack;//wieder auf die normal Farbe

Wenn du aber nur ein Wort bunt haben willst, klick mal hier: :wink:
www.delphi-forum.de/viewtopic.php?t=10784

Stefan

_________________
"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)
I_Z_U_A_L Threadstarter
Hält's aus hier
Beiträge: 15



BeitragVerfasst: So 11.05.03 12:40 
Re:

Danke für schnelle Antworten, leider kommt delphi mit
ausblenden Quelltext
1:
RichEdit1.SellAttributes.Font.Color :=  clRed; //Font wird nicht erkannt					

nicht klar!
Ich habe kleine veränderung durchgeführt und so funktioniert es:

ausblenden Quelltext
1:
2:
3:
Form1.RichEdit1.SelAttributes.Color :=  clRed;
Form1.RichEdit1.Lines.Add('dein Text');
Form1.RichEdit1.SelAttributes.Color :=  clBlack;//wieder auf die normal Farbe


Vielen Dank an Alle !



i_z_u_a_l

wenn bloß alles so leicht währe wie IntToStr :wink:
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: So 11.05.03 18:12 
:oops: Ooops, wie hat sich denn das font eingeschlichen?? :?
Stefan

_________________
"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)