procedure TForm2.QuickRep1BeforePrint(Sender: TCustomQuickRep; var PrintReport: Boolean); var QRlabelTemp:TQRLabel; begin QRlabel1.Caption:='CM'; QRlabelTemp:=TQRLabel.Create(self); with QRlabelTemp do begin Caption:='3'; Parent:=qrband1; Top:=qrlabel1.Top-2; Left:=qrlabel1.Left+qrlabel1.Width; Height:=qrlabel1.Height div 2; Font.Size:=qrlabel1.Font.Size div 2; end; end;试试行不行!
最简单的方法,放两个QRLabel不就可以了?
//参数:字体名如‘宋体’,位置,字体大小 procedure printcm3(fongname;string;var x,y,fsize:integer); const cm='cm'; begin with Printer.Canvas do begin Font.Size:=fsize; Font.Name:='宋体'; TextOut(x,y,cm); x:=x+TextWidth(cm); y:=y-Round(TextHeight(cm)/4); Font.Size:=Round(fsize*0.8); TextOut(x,y,'3'); end; end;
var PrintReport: Boolean);
var QRlabelTemp:TQRLabel;
begin
QRlabel1.Caption:='CM'; QRlabelTemp:=TQRLabel.Create(self);
with QRlabelTemp do
begin
Caption:='3';
Parent:=qrband1;
Top:=qrlabel1.Top-2;
Left:=qrlabel1.Left+qrlabel1.Width;
Height:=qrlabel1.Height div 2;
Font.Size:=qrlabel1.Font.Size div 2;
end;
end;试试行不行!
procedure printcm3(fongname;string;var x,y,fsize:integer);
const
cm='cm';
begin
with Printer.Canvas do
begin
Font.Size:=fsize;
Font.Name:='宋体';
TextOut(x,y,cm);
x:=x+TextWidth(cm);
y:=y-Round(TextHeight(cm)/4);
Font.Size:=Round(fsize*0.8);
TextOut(x,y,'3');
end;
end;
“V+数字”试一试或者对只能ABC的小键盘右键单击找找看