Link to home
Start Free TrialLog in
Avatar of jeabp
jeabp

asked on

Move Srtollbar in listbox

How do I automatickly move a scrollbar to the bottom of af listbox.
(I dont meen by using the mouse)
bye
Avatar of inthe
inthe

Hi,
maybe count the listbox items divide by
how many are in a pagedown movement of scroll and send that many times this message:

SendMessage(Listbox1.Handle,WM_VSCROLL, B_PAGEDOWN,0)
typo B_PAGEDOWN
 should read    SB_PAGEDOWN
ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This will also move the scrollbar to the bottom.

ListBox1.ItemIndex:=listbox1.Items.Count-1;

Peter