procedure TForm14.Button1Click(Sender: TObject); var i:Integer; temp:WideString; begin i:=1; temp:=Memo1.Lines.Text; if Pos(#10,temp)>0 then temp:=StringReplace(temp,#10,'',[rfReplaceAll]); if Pos(#13,temp)>0 then temp:=StringReplace(temp,#13,'',[rfReplaceAll]); if Length(temp)>40 then begin while i<(Length(temp) div 40)+1 do begin Insert(#13,temp,i*40); i:=i+1; end;//end while end;//end if Memo1.Lines.Text:=temp; end; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 这个是40个字符换行,你看看....
to gxgyj(杰克.逊_Discovery) :不行啊,我按照你的做法插入了换行符,还是没有换行,中间只是多了几个空格而已。
var
i:Integer;
temp:WideString;
begin
i:=1;
temp:=Memo1.Lines.Text;
if Pos(#10,temp)>0 then temp:=StringReplace(temp,#10,'',[rfReplaceAll]);
if Pos(#13,temp)>0 then temp:=StringReplace(temp,#13,'',[rfReplaceAll]);
if Length(temp)>40 then begin
while i<(Length(temp) div 40)+1 do begin
Insert(#13,temp,i*40);
i:=i+1;
end;//end while
end;//end if
Memo1.Lines.Text:=temp;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
这个是40个字符换行,你看看....
还有一个属性AutoStrech好像也是这个功能,但是把它设为True后也不起作用。
qrdbtext那樣可以直接和數據庫聯接,打印時能自動將表中的多條記錄打印出來。請各位大俠棒棒忙。
AutoStrech設為 True就ok啦