change font style

edited 1:05AM in FastReport 3.0
I am intented to change the font style but ERROR in this script
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

Comments

  • edited 1:05AM
    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.

    combatvc wrote: »
    I am intented to change the font style but ERROR in this script
    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
  • gordkgordk St.Catherines On. Canada.
    edited 1:05AM
    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;

Leave a Comment