Autor Beitrag
firefuzy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 69

Win 98 SE, WinXP Prof, Vista HPrem.
Delphi 7
BeitragVerfasst: So 21.05.06 10:55 
Hallo zusammen!
Wie kann man innerhalb des Richedits die Farbe/ Schriftart/ usw. ändern?
In der Delphi hilfe steht z.B.
ausblenden Delphi-Quelltext
1:
richedit1.Paragraph.Alignment:=taCenter;					

oder:
ausblenden Delphi-Quelltext
1:
richedit1.SelAttributes.Color:=clBlue;					

das funktioniert aber bei mir nicht.

MfG firefuzy


Moderiert von user profile iconGausi: Topic aus Sonstiges (Delphi) verschoben am Mi 24.05.2006 um 13:59
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: So 21.05.06 11:18 
hallo,

ich denke dies wird dir weiterhelfen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
 with richedit1 do
  begin
   Selstart := 2;
   Sellength := 3;
   SelAttributes.Color := clblue; // Farbe
   SelAttributes.Style := [fsItalic,fsBold,fsUnderline,fsStrikeOut]; // Style
   SelAttributes.Name := 'Marlett'// Schriftart
  end;
end;


Du musst für SelAttributes natürlich den Text zunächst selektieren.
Dies kannst du entweder mit SelStart; SelLength; oder mit Seltext := 'xy'; machen ;)

Mfg
firefuzy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 69

Win 98 SE, WinXP Prof, Vista HPrem.
Delphi 7
BeitragVerfasst: So 21.05.06 15:47 
Vielen Dank!! :D
Noch eine Frage:
Kann man auch schon im Editor die Eigenschaften für best. Bereiche im Richedit ändern?
firefuzy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 69

Win 98 SE, WinXP Prof, Vista HPrem.
Delphi 7
BeitragVerfasst: Di 23.05.06 22:34 
Hallo???
Hat keiner eine schlaue Antwort auf meine dumme Frage?
Jakob_Ullmann
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1747
Erhaltene Danke: 15

Win 7, *Ubuntu GNU/Linux*
*Anjuta* (C, C++, Python), Geany (Vala), Lazarus (Pascal), Eclipse (Java)
BeitragVerfasst: Mi 15.08.07 18:09 
Ich kapiere irgendwie deine Frage nicht. Einen Standard kriegst du mit FONT.* hin. Bei mir hat allerdings SelAttributes auch geklappt, wenn NICHTS markiert war. ;)