Board index » delphi » TMemo.Lines.LoadFromFile not working properly.

TMemo.Lines.LoadFromFile not working properly.

 I need some help with this small application. Specificaly the TMemo.Lines.LoadFromFile method isn't working the way
that I think it should.  When run,  the TMemo component on the dialog box only displays one line from the file, no matter
how many lines were written.

 I would appreciate any help you can provide to solve this problem.

 Thanks,

 Dave
--
 Dave Ashton
 dash...@lcp.com
 Lawyer's Cooperative Publishing
 Rochester, NY

 

Re:TMemo.Lines.LoadFromFile not working properly.


Quote
dash...@lcp.com wrote:
> I need some help with this small application. Specificaly the TMemo.Lines.LoadFromFile method isn't working the way
>that I think it should.  When run,  the TMemo component on the dialog box only displays one line from the file, no matter
>how many lines were written.

        It works fine for the rest of us - we have no way to tell what
you're doing wrong if you don't show us what you're doing.

--
David Ullrich
Don't you guys find it tedious typing the same thing
after your signature each time you post something?
I know I do, but when in Rome...

Re:TMemo.Lines.LoadFromFile not working properly.


In article <4ftb1t$...@speed.roc.lcp.com>, dash...@lcp.com writes
Quote
> I need some help with this small application. Specificaly the
>TMemo.Lines.LoadFromFile method isn't working the way
>that I think it should.  When run,  the TMemo component on the dialog box only
>displays one line from the file, no matter
>how many lines were written.

> I would appreciate any help you can provide to solve this problem.

Sounds as if the lines in the file are terminated by just linefeed
(0x0A) and not both carriage return (0x0D)  and linefeed, and the VCL
LoadFromFile method isn't written to cope with this.
--
Julian Moss                                      J M Technical Services
{*word*19}ermouth, Cumbria, UK                 Technical Writing and Software
(+44) 1900 826514                              jm...@jmtech.demon.co.uk

Re:TMemo.Lines.LoadFromFile not working properly.


On 15 Feb 1996, David Ullrich wrote:

Quote
> dash...@lcp.com wrote:
> > I need some help with this small application. Specificaly the TMemo.Lines.LoadFromFile method isn't working the way
> >that I think it should.  When run,  the TMemo component on the dialog box only displays one line from the file, no matter
> >how many lines were written.

>    It works fine for the rest of us - we have no way to tell what
> you're doing wrong if you don't show us what you're doing.

> --
> David Ullrich
> Don't you guys find it tedious typing the same thing
> after your signature each time you post something?
> I know I do, but when in Rome...

When you use LoadFromFile witha TMemo component, make sure the file to
load is a file with a text format (for instance .TXT files). Could
that have been the problem? It's the only thing I can think of,
because with me, it ALWAYS works!
Ritchie de Leeuwe
--------------------------------------------------
A network is like a human brain: totally messed up.
--------------------------------------------------

Other Threads