Delphi中通过RichEdit控件写.rtf文件的时候怎么样才能去掉自动换行,谢谢!

2025-03-20 22:11:25
推荐回答(2个)
回答(1):

自动换行的字符:#$D
x, y : string
xx : string ;
for i=o to RichEdit1.Lines.Count-1 do begin
x:= RichEdit1.Lines.Strings[i]
y:= copy(x,1,pos(#$D,x)) ;
xx:= xx + y ;
end;

xx 就是去掉自动换行的字符串了。

回答(2):

WordWrap属性设置false