Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-04

Forcing TMemo to dislplay last entry

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Richard Mace

Hi All,
I have some code that populates a TMemo via TMemo.Text := 'lots of lines of text..' and need a cross platform way of programatically forcing the TMemo to display the last entry as if the user has had manually scrolled to the bottom.

Any idea how I can achieve this?

Thanks in advance

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140425/78d70cbb/attachment.html>

Reply by email

Richard Mace
to Howard Page-Clark

Hi both,
Thanks for the quick responses :)

Richard

Howard Page-Clark wrote 22 lines
On 25/04/2014 18:30, Richard Mace wrote: > I have some code that populates a TMemo via TMemo.Text := 'lots of lines > of text..' and need a cross platform way of programatically forcing the > TMemo to display the last entry as if the user has had manually scrolled > to the bottom. > You can also use Memo1.SelStart:=Length(Memo1.Text); Howard -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140425/80f89bb0/attachment.html>

Reply by email

Richard Mace
to Sandro Cumerlato: you can use the following code: SendMessage(Memo1.Handle, EM_LINESCROLL, 0,…
Sandro Cumerlato wrote 5 lines
Hello Richard, you can use the following code: SendMessage(Memo1.Handle, EM_LINESCROLL, 0, Memo1.Lines.Count);

?Hi Sandro,
EM_LINESCROLL won't compile under Linux (Lubuntu 14.04)?

Richard?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140425/bd34858e/attachment.html>

Reply by email