delphi怎么删除richedit中的空行
例如:form2.Top :=20; form2.Left :=500;
form2.Left :=500; form2.Left :=500;
form2.Top :=20; form2.Left :=500;
form2.Left :=500; form2.Left :=500;
删除后让richedit中=
form2.Top :=20; form2.Left :=500;
form2.Left :=500; form2.Left :=500;
form2.Top :=20; form2.Left :=500;
form2.Left :=500; form2.Left :=500; procedure TForm1.Button1Click(Sender: TObject);
var
str: string;
begin
str := stringReplace(RichEdit1.text, #13#10#13#10, #13#10, ) ;
RichEdit1.Text := str;
end;
end. 冬雪雪冬 发表于 2019-6-11 21:04
谢谢,你这样只能删除一个空行,多个空行不行,我已经解决了
var i:integer;
for i := (RichEdit1.Lines.Count - 1) downto 0 do
begin
if RichEdit1.Lines = '' then RichEdit1.Lines.Delete(i);
end; wuxiaoman 发表于 2019-6-13 17:02
谢谢,你这样只能删除一个空行,多个空行不行,我已经解决了
var i:integer;
for i := (RichEdit1.Li ...
这个办法好
页:
[1]