Font Color and background color in memo object, in manual build report

1,566 views
Skip to first unread message

Jose Valle

unread,
Feb 26, 2012, 7:29:32 PM2/26/12
to FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro
Hello:

How can I change the color of a memo?

I tried this, but does not work

tmp_Name := FrPrn:MemoAt("Some memo with bottom frame ...", 30, 30,
600, 50)
FrPrn:SetManualObjProperty(tmp_Name + ".Font", "Color" ,
"clRed") //not work
FrPrn:SetManualObjProperty(tmp_Name , "Color" ,
"clGreen") //not work
FrPrn:SetManualObjProperty(tmp_Name , "hAlign" ,
"haLeft") //ok
FrPrn:SetManualObjProperty(tmp_Name + ".Frame", "Typ",
"[ftBottom,ftTop") //ok

Thanks for your help.

Jose Valle

Gaurav Tanna

unread,
Feb 27, 2012, 12:12:36 AM2/27/12
to fastreport_f...@googlegroups.com
Take private variable of font name(cFontName), size(nFontSize), color(nColor), style in your coding,

then in design mode, write this code, to take effect of your require font.

procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
    Memo1.Font.Name := GetHbVar('cFontName');
    Memo1.Font.Size := GetHbVar('nFontSize');  
    Memo1.Font.Color := GetHbVar('nColor');
    Memo1.Font.Style := 3;
END


Jose Valle

--
You received this message because you are subscribed to the Google Groups "FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro" group.
To post to this group, send email to fastreport_f...@googlegroups.com.
To unsubscribe from this group, send email to fastreport_for_x_h...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fastreport_for_x_harbour?hl=en.


Jose Manuel Garcia del Valle

unread,
Feb 27, 2012, 3:39:42 AM2/27/12
to fastreport_f...@googlegroups.com

Thanks Gaurav

 

But in ‘Manual build’ and using Frax I think that I have no script. I have to do all the coding from my prg.

    

Have a good day.

 

Jose VAlle



Se certificó que el correo no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 2012.0.1913 / Base de datos de virus: 2114/4834 - Fecha de la versión: 26/02/2012

Spirin Sergey

unread,
Feb 28, 2012, 3:21:51 AM2/28/12
to FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro
Hello, Jose,

TColor property is Interer property, not string. clRed, clWhite etc
are the integer constant.

property Color: TColor (TColor = -$7FFFFFFF-1..$7FFFFFFF)

The low three bytes represent RGB color intensities for
blue, green, and red, respectively. The value $00FF0000 represents
full-intensity, pure blue, $0000FF00
is pure green, and $000000FF is pure red. $00000000 is black and
$00FFFFFF is white.. etc

So:

FrPrn:SetManualObjProperty(tmp_Name + ".Font", "Color" , 255)


---
Sergey Spirin.
FastReport for Xbase-family languages,
http://www.spirins.com

Jose Manuel Garcia del Valle

unread,
Feb 28, 2012, 8:46:12 PM2/28/12
to fastreport_f...@googlegroups.com
Thanks Sergei. It's OK


-----Mensaje original-----
De: fastreport_f...@googlegroups.com
[mailto:fastreport_f...@googlegroups.com] En nombre de Spirin
Sergey
Enviado el: martes, 28 de febrero de 2012 9:22
Para: FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro


Asunto: Re: Font Color and background color in memo object, in manual build
report

Hello, Jose,

So:

--

You received this message because you are subscribed to the Google Groups
"FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro" group.
To post to this group, send email to
fastreport_f...@googlegroups.com.
To unsubscribe from this group, send email to
fastreport_for_x_h...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/fastreport_for_x_harbour?hl=en.

-----


Se certificó que el correo no contiene virus.
Comprobada por AVG - www.avg.es

Versión: 2012.0.1913 / Base de datos de virus: 2114/4835 - Fecha de la
versión: 27/02/2012

Reply all
Reply to author
Forward
0 new messages