Autor Beitrag
Zemke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 83

WIN XP
Delphi 4 Professionell
BeitragVerfasst: So 10.11.02 20:12 
Hallo,

ich möchte in einer RichEdit-Komponente eine bestimmte Zeile fett gedruckt haben. Das soll automatisch passieren, ohne daß ich erst manuel die Zeile mit der Maus markieren muß.

Gruß
Rainer Zemke
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 11.11.02 00:15 
Hallo,

such mal mit der Suchfunktion nach dem Begriff SelAttributes!

Gruß
Zemke Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 83

WIN XP
Delphi 4 Professionell
BeitragVerfasst: So 17.11.02 12:45 
Titel: SelAttributes
Hallo,

vielen Dank für den Tipp, aber ich komme dort nicht weiter. Das Beispiel ist nicht gerade gut gelungen. Dort werden zwei Zeilen fett gedruckt, was ich gar nicht will. Könnte mir vielleicht jemand einen Bespielquellcode zeigen? Das wäre ganz nett.
Vielen Dank.

Gruß
Rainer Zemke
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: So 17.11.02 18:14 
Hi,

dann poste doch mal den Code!

Gruß
TINO
Zemke Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 83

WIN XP
Delphi 4 Professionell
BeitragVerfasst: Sa 23.11.02 16:31 
Titel: Betreffzeile im Fettdruck
ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
qrlistform.QRRichText2.Font.size:=10;
//qrlistform.QRRichText1.font.Style:=[fsbold];
//qrlistform.QRRichText1.paragraph.firstindent:=40;
//Text bis zur Anschrift nicht fett gedruckt
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('FAX 22222');
qrlistform.qrrichtext1.Lines.Add('Herrn');
qrlistform.qrrichtext1.Lines.Add('Fritz Mustermann');
qrlistform.qrrichtext1.Lines.Add('Mühlenbergstr. 15');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('26122 Oldenburg');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('Hier soll der Betreff fett gedruckt werden');
qrlistform.qrrichtext1.Lines.Add('');
//dieser Text soll normal - also nicht fett - gedruckt werden
qrlistform.qrrichtext1.Lines.Add('Sehr geehrter Herr Mustermann,');

qrlistform.quickrep1.preview;




Wo und wie bekomme ich die Betreff-Zeile fettgedruckt?

Gruß
Rainer
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Sa 23.11.02 18:03 
na, hat doch Tino gesagt:
mit SelAttributes!

Hier (d)ein (getesteter) Code:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
...
qrlistform.qrrichtext1.Lines.Add('');
qrlistform.qrrichtext1.Lines.Add('');

qrlistform.QRRichText1.SelAttributes.Style := [fsBold];
qrlistform.qrrichtext1.Lines.Add('Hier soll der Betreff fett gedruckt werden');
qrlistform.QRRichText1.SelAttributes.Style := [];

...


SelAttributes bezieht sich immer von dem Augenblick an, an dem man es ändert. Zuerst änderst du also den Style auf Bold, dann schreibst du was, und dann ändert du den Style wieder auf normal.

Tschüß
Thomas

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert