Hi,

I have two list boxes of the same size and the same number of items in them.
The number of items is big, so to accommodate them the list boxes display
vertical scroll bars.
I want to synchronize the vertical scrolling of these two list boxes, so
when one of them is scrolled by the user, the other is scrolled as well so
they are both at the same scroll position.
How can I do this?
I looked for some sort of scroll event that would tell me the position of
the scroll bar but I could not find anything. There was a similar example in
"Programming VB6" by Francesco Balena, but a "Scroll" event is used there,
which we dont have in .NET ( at least I cant find it)

Thanks

Re: Scrolling in a list box by Pan

Pan
Tue Sep 20 07:28:12 CDT 2005

You can call listBox2.SetSelected(index,true) to scroll a list box

Pan
Dotnetskin: skin component for .NET Windows Forms
http://www.dotnetskin.net

"Z" <Z@discussions.microsoft.com> wrote in message
news:02B263FD-65DF-4C9F-B182-CE48449BC0EE@microsoft.com...
> Hi,
>
> I have two list boxes of the same size and the same number of items in
> them.
> The number of items is big, so to accommodate them the list boxes display
> vertical scroll bars.
> I want to synchronize the vertical scrolling of these two list boxes, so
> when one of them is scrolled by the user, the other is scrolled as well so
> they are both at the same scroll position.
> How can I do this?
> I looked for some sort of scroll event that would tell me the position of
> the scroll bar but I could not find anything. There was a similar example
> in
> "Programming VB6" by Francesco Balena, but a "Scroll" event is used there,
> which we dont have in .NET ( at least I cant find it)
>
> Thanks
>
>