Ernesto,
Coming to this posting late. The memo component probably has a blank line in
it from when it was added to the form. Either click in the lines property in
the object inspector and delete the line from there or before adding your
text to the memo, do a memo.lines.clear to delete the current contents. This
should solve your problem unless I've misunderstood.

Thanks,
Scott

__________________________________________
SoftSystem Solutions, LLC
18 Ridge Road
Clark, New Jersey 07066 USA
Scott Kellish, Owner
Tel.      +01 732 382 1873
Fax:     +01 732 382 1873
Mobile: +01 732 261-5856
e-mail:  [EMAIL PROTECTED]
__________________________________________

I drive way too fast to worry about cholesterol.

----- Original Message ----- 
From: "Ernesto Cisneros Sánchez" <[EMAIL PROTECTED]>
To: "'Borland's Delphi Discussion List'" <[email protected]>
Sent: Tuesday, February 28, 2006 10:17 AM
Subject: RE: TMemo has always one blank line


Thats the problem... The Memo always for start has a blank line.
Before I start to add lines in it.. It has one blank line

-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre
de Nesler, Thomas J
Enviado el: lunes, 27 de febrero de 2006 01:44
Para: Borland's Delphi Discussion List
Asunto: RE: TMemo has always one blank line

Hello!

Assuming that your memo component does not have a blank line in it before
you add your lines, you may be having a problem with the input text file.
You probably should add a showmessage to see what the program is putting
into the file.  Like this:

Var
S : String;
Begin
....

for i:=0 to length(t^.Data1) - 1 do
 Begin
S := Copy(t^.Data1[i], 0, length(t^.Data1[i]) - 2)
      Showmessage(S);
      Memo1.lines.Add(S);
 end;
....

My guess is that the last line in your input is a carriage return, causing
the blank line.
Good Luck!

Tom Nesler



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ernesto Cisneros Sánchez
Sent: Monday, February 27, 2006 6:37 AM
To: [email protected]
Cc: [email protected]
Subject: TMemo has always one blank line




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


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

CONFIDENTIALITY NOTICE: The information in this message is confidential and
may be legally privileged.  It is intended solely for the addressee.  Access
to this message by anyone else is unauthorized.  If you are not the intended
recipient, any disclosure, copying, or distribution of this message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error and permanently delete this message and any attachments.
Thank you.

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to