Results 1 to 3 of 3

Thread: scroll listview

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Posts
    18

    scroll listview

    Hello all!

    i have a listview popuplated from database.
    now....when i write something in text box and push the button i want that it finds me what i wrote in text box.

    it should select the item and scroll down to it...so that the item is on top of the listview.

    i've already made it for selecting
    Code:
                For i = 1 To ListView.ListItems.Count
                    If ListView.ListItems(i) = txtfoto(Index) Then
                        ListView.ListItems(i).Selected = True
                        Exit For
                    End If
                Next i
    but i don't know how to make it so that it would scroll down so that the selected item is on top.

    thanx!
    Matej
    it is nice to be important but is more important to be nice

  2. #2
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    This won't set the item at the top... but it will scroll until you can see it:

    VB Code:
    1. Listview.ListItems(i).EnsureVisible
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Posts
    18
    thanx!
    it is nice to be important but is more important to be nice

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