看到这个,我这样做了,还是不行啊:( Function MitiLine (Str:String;N:Integer):String; var L,I:Integer; Strs:String; Begin L:=Length(Str); L:=Round(L/N+0.5); If L=0 Then begin Result:=Str; Exit; End; For I:=1 To L Do Strs:=Strs+Copy(Str,N*(I-1)+1,N)+#13#10; Result:=Strs; End; *************** print.QRDBText3.Caption:=MitiLine(print.QRDBText3.Caption,10); print.QuickRep1.Preview;
Wordwrap为True
AutoStretch为True
怎么写呢?
Function MitiLine (Str:String;N:Integer):String;
var
L,I:Integer;
Strs:String;
Begin
L:=Length(Str);
L:=Round(L/N+0.5);
If L=0 Then
begin
Result:=Str;
Exit;
End;
For I:=1 To L Do Strs:=Strs+Copy(Str,N*(I-1)+1,N)+#13#10;
Result:=Strs;
End;
***************
print.QRDBText3.Caption:=MitiLine(print.QRDBText3.Caption,10);
print.QuickRep1.Preview;