Autoscroll of a listbox
i need to ask a very simple question but for the love of life I can not figure this out.
ok here is the question.
how do i scroll a list box by code ? with out the user having to click on the down arrow i need it to when ever something is added to the list box to scroll down again?
Any advice or code would be most welcome as this has foxed me for 2 weeks now
you could try setting the listindex property
if you want to go all the way to the bottom type
List1.ListIndex = List1.ListCount
if you want to go down 2 you put
List1.ListIndex = List1.ListIndex + 2
and so on - i hope you don't mind that the listindexes will be highlighted
if you want to move two and the user did not highlight the listbox, then you must set the listindex property
List1.ListIndex = 0
or if it is out of room (+2 = 10 but listcount = 9)
then you must bring down the listindex
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL