Results 1 to 4 of 4

Thread: Listview focus

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    Gloucestershire, England
    Posts
    301

    Post

    I have got a listview setup in report mode. If I add more items than will fit on the screen, a slider appears on the right.

    How do I get the focus to follow the new data (arriving off the bottom of the visible section) rather than just display the top few items?

    Cheers

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Post

    Whenever you add a new item to the listview use the following code to change what item is selected:

    With ListView1
    Set .SelectedItem = .ListItems(.ListItems.Count)
    End With

    Good luck!

    ------------------
    Joacim Andersson
    joacim@programmer.net
    joacim@yellowblazer.com
    www.YellowBlazer.com



  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    Gloucestershire, England
    Posts
    301

    Post

    I tried that, the item gets selected, but the focus remains at the top, any more ideas??

    Cheers


    [This message has been edited by Rick H (edited 01-25-2000).]

  4. #4
    Member
    Join Date
    Jan 1999
    Location
    Garden Grove, CA, Orange
    Posts
    55

    Post


    ListView1.SelectedItem.EnsureVisible

    Joon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width