DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Location
    Northampton,United Kingdom
    Posts
    230

    Autoscroll of a listbox

    Hi
    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

    Thanks
    Drew

  2. #2
    Join Date
    Mar 2005
    Posts
    5
    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
    Note:

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links