473,499 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Synchronize Listview scrollbars

Hello,

i have two listviews next to each other on a form. I would like to
synchronize both vertical scrollbars of the two listviews with one scrollbar
(for example VScrollBar). How can I do that?

Thank you very much.

Oct 16 '08 #1
1 4976
Depending on the configuration of the ListView, you may be able to use the
TopItem property. Set it to an item between 0 and Count-1 for both ListView
controls, based on the Value of the VScrollbar. You might need to do a
calculation to convert the scrollbar value to a valid topitem reference, or
perhaps you can adjust the scrollbar maximum, based on the ListView Count
property, to return an appropriate value without requiring calculation.

ListView1.TopItem = ListView1.Items(VScrollBar1.Value)
ListView2.TopItem = ListView2.Items(VScrollBar1.Value)

There are some restrictions on the use of TopItem that you will have to
consider, and you will also have to work out how to hide the default scroll
bars.

"andi rickenbach" <an************@discussions.microsoft.comwrote in
message news:B1**********************************@microsof t.com...
Hello,

i have two listviews next to each other on a form. I would like to
synchronize both vertical scrollbars of the two listviews with one
scrollbar
(for example VScrollBar). How can I do that?

Thank you very much.
Oct 17 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
8695
by: Kovan A. | last post by:
since i couldnt find anyway to scroll a listview having disabled the scrollbars, i am left with no choice but to make the current scrollers bigger any leads as to which beast i am up against for...
5
22443
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...
2
1864
by: Mark | last post by:
I have basically a 2 part question: 1) is there a way to have a listview that can scroll, but hide the scrollbars. I know that sounds odd, but this is a touch screen app and there are "scroll...
1
1565
by: TomasFloyd | last post by:
Hi Everyone I'm using the standard ListView control of VS 2003. I would like to know if there is a way to catch the event of the scrollbars attached to a ListView being 'scrolled' or 'clicked'?...
2
1991
by: ohadasor | last post by:
Hi All, I have a ListView control, and I need it to have only vertical scrollbar, not horizontal. How can I do that? The only way I found to control its scrollbars is using ListView.Scrollable,...
0
1374
by: Sanjib Biswas | last post by:
Hi, I would like to know how to synchronize the vertical & horizontal scrollbars in 2 TreeView to move up & down, left & right synchronously. Noticed that TreeView does not have any scroll event...
0
1631
by: inandout | last post by:
Hi, I was wondering if anyone can help me with this. I have a listview that is specified to a size of: 348W x 308H When items are added to it, no problems. However when items continue to be...
3
4926
by: Dilip | last post by:
I inherited an owner drawn control that subclasses the Windows Forms ListView control to provide additional functionalities. I wanted to detect the presence of the Vertical scrollbar so that I can...
1
5532
by: =?Utf-8?B?YW5kaSByaWNrZW5iYWNo?= | last post by:
Hello, i have two listviews next to each other on a form. I would like to synchronize both vertical scrollbars of the two listviews with one scrollbar (for example VScrollBar). How can I do...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5468
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.