PDA

Click to See Complete Forum and Search --> : Lisbox Scroll


fowlerjp
Dec 11th, 1999, 11:40 AM
Is it possible to have a list box auto scroll to the last entry, and not stay at the top waiting for the user to manually scroll down? I have played with setting the focus and then sending a {down} key but that is kind of lame.

atomsheep
Dec 11th, 1999, 11:44 AM
you can play with the listboxes TopIndex property. To scroll down to the bottom-most item in a listbox, first find out how many items the height of the listbox can accommodate, and then do some calculations to find out what index should be at the top, and then set the listbox's TopIndex property to whatever.

ElayaRaja
Jan 10th, 2003, 05:24 AM
Try this
List1.AddItem ("somename")
List1.ListIndex = List1.ListCount - 1