By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,023 Members | 1,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,023 IT Pros & Developers. It's quick & easy.

listview scrollbar question

P: n/a
Hi All,
How can I get to scroll bars of a listview, I am trying to sync two listviews so I need to overload
one of the listview, How can I achieve this ?

Thank You.
Mar 7 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
What you want to do is create a class that derives from ListView where
you override the WndProc method. You want to handle the WM_VSCROLL and
WM_HSCROLL messages. When the message fires, you can raise an event to
indicate that the scroll position changed in the listview.

Then, have the listviews subscribe to those events on each other, and
have the scroll position change when it changes in the other list view.

You will have to make sure that you don't get into an infinite loop,
since when you move the scrollbar in response to the first lisview scroll
moving, it will fire the same event.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<Co**********@al.com> wrote in message
news:11****************@despina.uk.clara.net...
Hi All,
How can I get to scroll bars of a listview, I am trying to sync
two listviews so I need to overload
one of the listview, How can I achieve this ?

Thank You.

Mar 7 '06 #2

P: n/a
Hello Co**********@al.com,

The idea is here http://www.dicks-blog.com/archives/2...box-scrolling/
Hi All,
How can I get to scroll bars of a listview, I am trying to
sync two listviews so I need to overload
one of the listview, How can I achieve this ?
Thank You.

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.