Attach scrollbar to listview
-
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
-
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
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
-
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
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]
-
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]
OK. the width is the same everywhere, but i need for this app specifically a wide scrollbar