Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Scrolling a listview control in .net

Scrolling a listview control in .net

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharphelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VSush
    wrote on last edited by
    #1

    Hi All, I am using a .net listview control with the AutoScroll property set. I want to programatically scroll the listview control. I tried using P/Invoke messages. When I used the SetScrollPos message, the scroll bar moves but the content of the listview itself doesnt move. Anbody faced a similar problem before? Any clue how i can solve this??

    D 1 Reply Last reply
    0
    • V VSush

      Hi All, I am using a .net listview control with the AutoScroll property set. I want to programatically scroll the listview control. I tried using P/Invoke messages. When I used the SetScrollPos message, the scroll bar moves but the content of the listview itself doesnt move. Anbody faced a similar problem before? Any clue how i can solve this??

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      AutoScroll doesn't do what you apparently think it does. P/Invoking the Win32 API is also overkill. All you have to do is call the ListView's .EnsureVisible(_index_) method! Documentation[^] on ListView.EnsureVisible method Dave Kreskowiak Microsoft MVP - Visual Basic

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups