procedure TSampleFormat.Clear; begin if FMemo <> nil then FMemo.Free; FMemo := TfrxMemoView.Create(nil); if frxDesignerComp <> nil then begin FMemo.Font := frxDesignerComp.DefaultFont;
//设置默认字体 暂时好像FDefaultFont这个代码无效果 if Screen.Fonts.IndexOf('新宋体')>=0 then begin FMemo.Font.Name:='新宋体'; FMemo.Font.Size:=9; end else if Screen.Fonts.IndexOf('Tahoma')>=0 then begin FMemo.Font.Name:='Tahoma'; FMemo.Font.Size:=9; end ; //修改fastReport默认字体---------- end ----------
procedure TForm1.frxReport1BeginDoc(Sender: TObject); // before "Begin Doc" to write values on report begin for var i: Integer := 0 to (frxReport1.ComponentCount - 1) do if (frxReport1.Components[i] is TfrxMemoView) then begin TfrxMemoView(frxReport1.Components[i]).Font.Name := 'Arial Bold'; TfrxMemoView(frxReport1.Components[i]).Font.Color := clRed; end; end;
此帖子包含附件: 大小:12.6K
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3