Results 1 to 3 of 3

Thread: Dynamically scrolling a vertical scrollbar

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    London
    Posts
    26

    Dynamically scrolling a vertical scrollbar

    I will be extemely grateful if I can get help with this problem. I have a subclassed a listview and made it dataaware, which I use to display records by way of a currency manager object. If the listview's listviewitems exceed the height of the Listview control in the client area of a form, scrollbars automatically appears as expected.

    What I will like to do is to move the scrollbar in my code to the end or the beginning , depending on certain factors.

    Thanks in advance
    erimus

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840

    EnsureVisible

    Hi.

    Try this:

    Go to top:
    Listview1.Items(0).EnsureVisible()

    Go to bottom:
    Listview1.Items(Listview1.Items.Count-1).EnsureVisible()

    Hope you can use this.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    London
    Posts
    26

    Re:EnsureVisible

    Thanks Pax, you are a diamond geezer. It worked.
    erimus

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