Board index » delphi » Autoscroll listbox to last added entry

Autoscroll listbox to last added entry

Is it possible to let a tlistbox automatically scroll to the last entry,
without making it selected ?

If anyone knows and would like to share, i'd be much obliged.

 

Re:Autoscroll listbox to last added entry


I suppose you could use TopIndex to put it at the top.  Setting
ItemIndex will select.

John Pierce

Re:Autoscroll listbox to last added entry


In article <90498D078MJFVerschuurem...@207.105.83.62>, Mario Verschuur
wrote:

Quote
> Is it possible to let a tlistbox automatically scroll to the last entry,
> without making it selected ?

  listbox1.perform( WM_VSCROLL, SB_BOTTOM, 0 );
  listbox1.perform( WM_VSCROLL, SB_ENDSCROLL, 0 );

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: I'm unable to visit the newsgroups every day at the moment,
so be patient if you don't get a reply immediately.

Re:Autoscroll listbox to last added entry


100113.1...@compuXXserve.com (Peter Below (TeamB)) wrote in
<VA.00006975.01047...@antispam.compuserve.com>:

Quote
>In article <90498D078MJFVerschuurem...@207.105.83.62>, Mario Verschuur
>wrote:
>> Is it possible to let a tlistbox automatically scroll to the last entry,
>> without making it selected ?

>  listbox1.perform( WM_VSCROLL, SB_BOTTOM, 0 );
>  listbox1.perform( WM_VSCROLL, SB_ENDSCROLL, 0 );

>Peter Below (TeamB)  100113.1...@compuserve.com)
>No e-mail responses, please, unless explicitly requested!
>Note: I'm unable to visit the newsgroups every day at the moment,
>so be patient if you don't get a reply immediately.

Thanks Peter. This works better than calculating from topindex using
visible area.

Other Threads