TMemo has always one blank line
Hi list i'm writing 'cos i need to save a memo content to a txt file.
I 'll do as follow:
memo1.Lines.Clear;
for i:=0 to length(t^.Data1) - 1 do
Memo1.lines.Add(Copy(t^.Data1[i], 0, length(t^.Data1[i]) - 2));
i put the -2 in the copy function 'cos I don't want the last 2 character of
the record.
The thing is that this actually add in the memo what i want but leave a
blank line at the end of the memo.
example.
the memo has:
REF 2345
REF 8789
REF 0908
<----- here is the last blank line
when i copy the content to the txt file with:
writeLn(F, query1.fieldbyname('data1').asstring);
instead of write only the 3 lines, it will write 4 with the last empty
any idea on this??
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi