Re: [Lazarus] Forcing TMemo to dislplay last entry

2014-04-28 Thread Michael Schnell
On 04/25/2014 07:35 PM, Sandro Cumerlato wrote: SendMessage(Memo1.Handle, EM_LINESCROLL, 0, Memo1.Lines.Count); AFAIK, this is a Windows-only option that does not work cross-platform (and hence should not be recommended). OTOH, I don't know a better one :-( . -Michael --

[Lazarus] Forcing TMemo to dislplay last entry

2014-04-25 Thread 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

Re: [Lazarus] Forcing TMemo to dislplay last entry

2014-04-25 Thread Sandro Cumerlato
Hello Richard, you can use the following code: SendMessage(Memo1.Handle, EM_LINESCROLL, 0, Memo1.Lines.Count); -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Forcing TMemo to dislplay last entry

2014-04-25 Thread Howard Page-Clark
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

Re: [Lazarus] Forcing TMemo to dislplay last entry

2014-04-25 Thread Richard Mace
Hi both, Thanks for the quick responses :) Richard On 25 April 2014 18:46, Howard Page-Clark h...@talktalk.net wrote: 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

Re: [Lazarus] Forcing TMemo to dislplay last entry

2014-04-25 Thread Richard Mace
On 25 April 2014 18:35, Sandro Cumerlato sandro.cumerl...@gmail.com wrote: 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​ --