change font style

edited 5:22AM 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 5:22AM
    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 5:22AM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.