473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

listview scrollbar question

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
2 6898
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Miller | last post by:
Hello, I posted this to DotNet.Framework.Controls a week ago or so and got no response, so now I will repost it here to see if anyone here knows anything about it... I have an application...
1
by: paolo.riba | last post by:
Hi everybody! Could anyone know how can I syncronize a horizontal scrollbar with a listview? Actually I can only syncronize the horizontal scrollbar with the listview horizontal scrollbar, but...
2
by: | last post by:
Hi, Trying to figure out how i can tell if the scrollbar is in the bottom of my listview, im using the listview to display log files and i track them and add new items to the bottom of the...
5
by: Frank Rizzo | last post by:
I reload the items in the listview on a regular schedule (i.e. clear the listview, then load it up with fresh values). I want add a convinience to the user whereby my application remembers the...
5
by: Bernie Yaeger | last post by:
I'm using a listview in view 'list' mode, multiselect and dragdrop true. When the listview appears, it has a horizontal scrollbar (if needed) but not vertical scrollbar. How can I get it to...
12
by: J L | last post by:
When I fill a listview, I resize the columns to fit the data. I need to know if the data will fit vertically or if there will be a vertical scroll bar. I need to know this so I can allow for it on...
2
by: Ben H | last post by:
Hello all I'm using a listview in my app but I want to scroll the listview programatically as I hate the look of the standard scrollbar. So, the listview is scrolled programatically using...
1
by: malpani.abhijit | last post by:
Hi, I am having a ListView component in my WinForm, when i add some images into it, it gives me a vertical scroll bar. What i want is, the horizontal scrollbar instead of vertical. Is there any...
1
by: Kimmo Laine | last post by:
Hi! I need to resize the last column in my listview control so that there won´t be horizontal scrollbar. Lets first create lv and add some items: listView1.View = View.Details;
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.