Autoscroll of a listbox


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Autoscroll of a listbox

  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

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center