Soylent green? - about setting font sizes, colors
I want three lines of text:
Code
// 24 point, left aligned
par:=rtf.ActiveText.AppendPar;
par.align:=paralLeft;
par.ASet(WPAT_CharFontSize, 100*24);
par.Insert(maxint,'Big headline',txt1);
// 10 point right aligned
par:=rtf.ActiveText.AppendPar;
par.ASet(WPAT_CharFontSize, 100*10);
par.align:=paralRight;
par.Insert (maxint,'Printed: '+datetostr(dt)+' at: '+timetostr(dt)+' by ('+CurrentUsername+')',txt2);
// 10 point green, left aligned
par:=rtf.ActiveText.AppendPar;
par.ASetColor(WPAT_CharColor,clgreen);
par.ASet(WPAT_CharFontSize, 100*10);
par.align:=paralLeft;
par.Insert(maxint,'This is the third line',txt3);
Alles anzeigen
Unfortunately, it doesn't become green, and all three lines use a large font. Any ideas what goes wrong?