Scrolling how to...

  • Thread starter Thread starter Jacek Jurkowski
  • Start date 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...
 
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,
 
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
 
Back
Top