Help - Search - Members - Calendar
Full Version: change font style
Fast Reports forum > Fast Reports Products > FastReport 3.0
combatvc
I am intented to change the font style but ERROR in this script

CODE
procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
       If <frxDBDatasetInforme."ACTIVO"> = 0 then
       begin
               Memo37.Font.Style := [fsStrikeOut];
       end
       else
       begin
               Memo37.Font.Style := [];  
       end;
end;


what is it the problem???

thanks
Rajaei
Hi, You cna use this instead your code:
procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
If <frxDBDatasetInforme."ACTIVO"> = 0 then
begin
Memo37.Font.Style := 3;
end
else
begin
Memo37.Font.Style := 0;
end;
end;
I hope this code is useful for you.


QUOTE(combatvc @ May 15 2007, 12:22 PM) *
I am intented to change the font style but ERROR in this script

CODE
procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
       If <frxDBDatasetInforme."ACTIVO"> = 0 then
       begin
               Memo37.Font.Style := [fsStrikeOut];
       end
       else
       begin
               Memo37.Font.Style := [];  
       end;
end;


what is it the problem???

thanks

gordk
Just so you understand your error.
do not use [] these delimiters are for use inside the memoview objects they trigger the expression evaluator to get the value of the expression
simply font.style := fsbold; or ie font.style := fsbold + fsunderline; will do
to clear font.style := 0;
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.