Board index » delphi » In Memo: Show the last lines of a file

In Memo: Show the last lines of a file

Hi to all and thanks for any replays.

I want to load a text file in a Memo, and  show the last lines of that
file without having to scroll down.
Thanks for any replays

Gery

www.zipworld.com.au/~gprdata

Have a great day

 

Re:In Memo: Show the last lines of a file


Quote
gprdataNoS...@zipworld.com.au (Gery Rohrig) wrote:
>I want to load a text file in a Memo, and  show the last lines of that
>file without having to scroll down.

IIRC, if you load the memo from a file, if you have visible off
while it is loading and then set it to visible you see the top
of the file, but if visible is on while loading, you see the
bottom of the file.

Re:In Memo: Show the last lines of a file


Quote
"Gery Rohrig" <gprdataNoS...@zipworld.com.au> wrote in message

news:3b16d292.4143184@news.zipworld.com.au...

Quote
> Hi to all and thanks for any replays.

> I want to load a text file in a Memo, and  show the last lines of that
> file without having to scroll down.

Memo1.LoadFromFile (theFileName);
Memo1.SelStart := Length (Memo1.Text);

Re:In Memo: Show the last lines of a file


On Thu, 31 May 2001 21:58:38 -0400, Jud McCranie

Quote
<jud.mccra...@mindspring.com> wrote:
>gprdataNoS...@zipworld.com.au (Gery Rohrig) wrote:

>>I want to load a text file in a Memo, and  show the last lines of that
>>file without having to scroll down.

>IIRC, if you load the memo from a file, if you have visible off
>while it is loading and then set it to visible you see the top
>of the file, but if visible is on while loading, you see the
>bottom of the file.

This didn't work on my setup, but tanks anyway
Thanks for any replays

Gery

www.zipworld.com.au/~gprdata

Have a great day

Re:In Memo: Show the last lines of a file


On Thu, 31 May 2001 23:07:01 -0400, "Bruce Roberts"

Quote
<b...@bounceitattcanada.xnet> wrote:

>"Gery Rohrig" <gprdataNoS...@zipworld.com.au> wrote in message
>news:3b16d292.4143184@news.zipworld.com.au...
>> Hi to all and thanks for any replays.

>> I want to load a text file in a Memo, and  show the last lines of that
>> file without having to scroll down.

>Memo1.LoadFromFile (theFileName);
>Memo1.SelStart := Length (Memo1.Text);

Thanks for the hint above.
SelStart did send the cursor to the last line but
did not scroll the file up. But using SelLength aswell
did do the trick.

     Form1.Memo2.SelStart := Length(form1.Memo2.Text);
     Form1.Memo2.SelLength:= Form1.Memo2.SelStart;

     Form1.Memo2.SelStart := Length(form1.Memo2.Text);
     Form1.Memo2.SelLength:= Form1.Memo2.SelStart;

Quote

Thanks for any replays

Gery

www.zipworld.com.au/~gprdata

Have a great day

Other Threads