Scrolling how to...

  • Thread starter Jacek Jurkowski
  • Start date
J

Jacek Jurkowski

How to determine whenever Panel is scrolled?

I have one Panel with AutoScroll property on.
I would like to secound Panel move it's content
the same as the first one without having scroll bars.
I should set the Location property of ClientRectangle
of the secount Panel the same as The first one but i can't
find any Event to handle Scroll change...
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

I don;t quite understand your question so I will assume that you have two
panels and each one has a text, the first panel will have scroll and the
second not, but you want to have the text of both of then in sync. so the
question is how to simulate an scroll in the second one.

If your scenario is similar to this, what you can do is insert another panel
inside the second panel, this interior panel will host the content. when you
scroll in the first panel you will scroll in the same amount this interior
panel, as it's enclosed by the second panel ( the one without the scroll)
you will simulate an scroll on it.

Cheers,
 
G

Guest

Hi

Not quite, as this would create other problems when one want to keep the inserted panel visible at the top of its hosting panel, especially where focusing is concerned

Does anyone know of a solution that allows a program to trap scroll events, as the paint event does not always fire on scrolling either

Thank
Adrian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top