UserControl Autoscroll - Uncontrollable Scrolling.

B

brian

The usercontrol has autoscroll set to true. Every once in
a while the usercontrol will automatically scroll to the
top on its own. The only visible event that I can see
fire is the Paint event. I have not been able to
determine the pattern of events that cause this, but most
the time it occurs when hiding other controls that are
docked with it.

Has anyone seen this issue, and have a solution to stop
it? Thanks.
 
P

Paul Wardle

Do you have other controls upon the user control? I believe this occurs
when a control upon the usercontrol receives the focus, and the usercontrol
is scrolled to display the control with the focus.

You may get this behaviour with a picturebox (for example) auto resized on a
usercontrol that scrolls to display the complete picturebox.

I think I handled this by overriding the WndProc and intercepting the
WM_FOCUS message.

HTH

Paul Wardle
 
B

brian

That was the problem...thank you.
-----Original Message-----
Do you have other controls upon the user control? I believe this occurs
when a control upon the usercontrol receives the focus, and the usercontrol
is scrolled to display the control with the focus.

You may get this behaviour with a picturebox (for example) auto resized on a
usercontrol that scrolls to display the complete picturebox.

I think I handled this by overriding the WndProc and intercepting the
WM_FOCUS message.

HTH

Paul Wardle





.
 

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