Scrolling panel

N

Nathan

Hi,

I have a panel on a form that contains a number of controls, so many that
the panel has a vertical scrollbar in order to view all of them. When the
form first loads, the panel's scrollbar automatically scrolls to about the
middle rather than staying at the top. Also, when I click on one of the
controls, a dialog box appears to allow me to edit it's information. When I
click OK on the dialog box, the information on the control is changed, and
the panel's scrollbar once again scrolls to the middle. This last scenario
only happens once, on the first control I click. After that everything
works as it should. Does anyone have any idea what's going on, or what
event is firing to cause the panel to scroll automatically sometimes?

Thanks,
Nathan
 
K

Ken Tucker [MVP]

Hi,

Make sure the panels autoscrollpostion, and autoscrollmargin are set
to 0,0

http://msdn.microsoft.com/library/d...rollablecontrolclassautoscrollmargintopic.asp

http://msdn.microsoft.com/library/d...llablecontrolclassautoscrollpositiontopic.asp

Ken
---------------
Hi,

I have a panel on a form that contains a number of controls, so many that
the panel has a vertical scrollbar in order to view all of them. When the
form first loads, the panel's scrollbar automatically scrolls to about the
middle rather than staying at the top. Also, when I click on one of the
controls, a dialog box appears to allow me to edit it's information. When I
click OK on the dialog box, the information on the control is changed, and
the panel's scrollbar once again scrolls to the middle. This last scenario
only happens once, on the first control I click. After that everything
works as it should. Does anyone have any idea what's going on, or what
event is firing to cause the panel to scroll automatically sometimes?

Thanks,
Nathan
 

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