Results 1 to 4 of 4

Thread: [RESOLVED] [2005] Listview scrolling

  1. #1

    Thread Starter
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Resolved [RESOLVED] [2005] Listview scrolling

    Hi guys,

    I've got a listview (in details mode) with a large number of items.

    Above that I have a panel with a graph type thing and when i click on the graph a row gets selected in the listview. This works fine but if the item is not on the immediate window (i.e. an item too far down the list) there's no way to tell it has been selected.

    Is there a way to 'jump' the scroll bar down to the selected item?

    Hope that makes sense
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Listview scrolling

    What do I always say? if you want to do something with or to an instance of a type then read the documentation for that type before you do anything else. You're using a ListView. If you'd read the documentation for the ListView class you'd have come across the EnsureVisible method very quickly. No mess, no fuss. This is how easy it is to answer your own questions if you only read the help files.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Re: [2005] Listview scrolling

    You can save me the sermon

    Ta,
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] [2005] Listview scrolling

    If it convinces people to read the help files then I'm prepared to preach. Anyone, even a beginner, can answer most of their questions by reading the help. If you can answer your own questions in a matter of minutes by reading some documentation, that's got to be good for you, yes?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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