fastreport 自动缩小字体以填允
来源:互联网 发布:淘宝买家如何删除差评 编辑:程序博客网 时间:2024/04/29 02:17
1.
procedure Memo8OnBeforePrint(Sender: TfrxComponent);
begin
while ((TfrxMemoView(Sender).CalcHeight-TfrxMemoView(Sender).LineSpacing)-TfrxMemoView(Sender).Height>0) do
begin
TfrxMemoView(Sender).Font.Size := TfrxMemoView(Sender).Font.Size-5;
end;
end;
2.
begin
per:=1.4;
xy:=[adoquery1."xy"];
len:=length(xy);
width:=memo1.width;
fs:= Round(width / len * per) ;
memo1.font.size:=fs;
memo1.memo :=xy;
memo2.memo:= str(width);
end
增加字体调整模式
TfrxScaleFontSize = (sfsWidth, sfsHeight, sfsNone);
增加TfrxMemoView属性
property ScaleFontSize;
增加TfrxCustomMemoView属性
property ScaleFontSize: TfrxScaleFontSize read FScaleFontSize write FScaleFontSize default sfsNone;
procedure TfrxCustomMemoView.BeforePrint;
begin
inherited;
if not IsDataField then
FTempMemo := FMemo.Text;
case FScaleFontSize of
sfsNone: ;
sfsWidth:
if not WordWrap and not AutoWidth then //按宽度调整时--自动换行时不可用 ; 自动宽度时不可用
while (CalcWidth - Width > 0) do
Font.Size := Font.Size - 1;
sfsHeight:
if (StretchMode = smDontStretch) then //伸展时不能按高度调整
while ((CalcHeight - LineSpacing) - Height > 0) do
Font.Size := Font.Size - 1;
end;
end;
procedure Memo8OnBeforePrint(Sender: TfrxComponent);
begin
while ((TfrxMemoView(Sender).CalcHeight-TfrxMemoView(Sender).LineSpacing)-TfrxMemoView(Sender).Height>0) do
begin
TfrxMemoView(Sender).Font.Size := TfrxMemoView(Sender).Font.Size-5;
end;
end;
2.
begin
per:=1.4;
xy:=[adoquery1."xy"];
len:=length(xy);
width:=memo1.width;
fs:= Round(width / len * per) ;
memo1.font.size:=fs;
memo1.memo :=xy;
memo2.memo:= str(width);
end
增加字体调整模式
TfrxScaleFontSize = (sfsWidth, sfsHeight, sfsNone);
增加TfrxMemoView属性
property ScaleFontSize;
增加TfrxCustomMemoView属性
property ScaleFontSize: TfrxScaleFontSize read FScaleFontSize write FScaleFontSize default sfsNone;
procedure TfrxCustomMemoView.BeforePrint;
begin
inherited;
if not IsDataField then
FTempMemo := FMemo.Text;
case FScaleFontSize of
sfsNone: ;
sfsWidth:
if not WordWrap and not AutoWidth then //按宽度调整时--自动换行时不可用 ; 自动宽度时不可用
while (CalcWidth - Width > 0) do
Font.Size := Font.Size - 1;
sfsHeight:
if (StretchMode = smDontStretch) then //伸展时不能按高度调整
while ((CalcHeight - LineSpacing) - Height > 0) do
Font.Size := Font.Size - 1;
end;
end;
0 0
- fastreport 自动缩小字体以填允
- fastreport 自动缩小字体以填充
- 水晶报表字体自动缩小
- ios UILabel 自动换行,缩小字体代码
- UILabel 字体超出 frame 自动缩小
- jQuery 控制div框自动缩小字体避免换行
- 自动改变字体以适应label宽度
- FastReport实现自动填充
- treeview字体扩大缩小
- 字体放大缩小
- android 根据TextView宽度 自动缩小字体大小 以适应其宽度
- 使用fastreport以代码方式创建报表
- word整体放大、缩小字体
- jquery 控制字体放大缩小
- 自动放大缩小地图
- FastReport
- FastReport
- FastReport
- 一个完整的Socket例子
- android下bluetooth使用D-BUS的学习笔记一
- poj-2676
- java设计模式(0)
- OAF 错误: 过时的数据
- fastreport 自动缩小字体以填允
- HDU 2501 Tiling_easy version
- 游戏中的货币
- c++ template中的个别处理方式
- fmt:formatDate的输出格式 .
- java.nio.BufferOverflowException异常出现原因及解决方法
- Mybatis 自动生成代码工具
- 封送处理不同类型的数组
- C++ win socket编程