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. Visual Basic
  4. Attach scrollbar to listview

Attach scrollbar to listview

Scheduled Pinned Locked Moved Visual Basic
question
4 Posts 3 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.
  • E Offline
    E Offline
    Eli Nurman
    wrote on last edited by
    #1

    Hi, The default scrollbar of windows seems to be to narrow for the ListView i'm developing for the application, this is why i have created a custom ScrollBar. The question is how do i attach the scrollbar to the listview that when scrolled the listview will scroll. Please advice. Thanks

    D L 2 Replies Last reply
    0
    • E Eli Nurman

      Hi, The default scrollbar of windows seems to be to narrow for the ListView i'm developing for the application, this is why i have created a custom ScrollBar. The question is how do i attach the scrollbar to the listview that when scrolled the listview will scroll. Please advice. Thanks

      D Offline
      D Offline
      DaveAuld
      wrote on last edited by
      #2

      Why does it seem too narrow? it will be standard across the OS, if you try and change one scrollbar in your application, it will then look different to everything else and just seem a bit odd. I don't know how to do it without spending hours searching the docs and google etc. So hopefully someone more knowledgeable will respond, but one method would be to set up your scrollbar relative to the number of items in the listview, and then when you scroll, change the listview.topitem property to simulate a scroll. You would have to monitor the listview changes also, as well as what to do if the user uses arrow up and down while listview has focus. Seems way to much effort for something that you should not need to think about. i.e. leave the original scrollbars as is.

      Dave GoogleWave: dave.m.auld[at]googlewave.com Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

      modified on Sunday, January 24, 2010 3:27 PM

      1 Reply Last reply
      0
      • E Eli Nurman

        Hi, The default scrollbar of windows seems to be to narrow for the ListView i'm developing for the application, this is why i have created a custom ScrollBar. The question is how do i attach the scrollbar to the listview that when scrolled the listview will scroll. Please advice. Thanks

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Eli Nurman wrote:

        The default scrollbar of windows seems to be to narrow for the ListView

        That doesn't make sense to me. Most scrollbars look the same in Windows. For some sizes, see SystemInformation class, the HorizontalScrollBarXyz and VerticalScrollBarXyz properties. :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


        I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
        [The QA section does it automatically now, I hope we soon get it on regular forums as well]


        E 1 Reply Last reply
        0
        • L Luc Pattyn

          Eli Nurman wrote:

          The default scrollbar of windows seems to be to narrow for the ListView

          That doesn't make sense to me. Most scrollbars look the same in Windows. For some sizes, see SystemInformation class, the HorizontalScrollBarXyz and VerticalScrollBarXyz properties. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
          [The QA section does it automatically now, I hope we soon get it on regular forums as well]


          E Offline
          E Offline
          Eli Nurman
          wrote on last edited by
          #4

          OK. the width is the same everywhere, but i need for this app specifically a wide scrollbar

          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