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.