I have a UserControl Parent
that contains Child
controls. I would like my Parent
control to Autoscroll when it is too small for its Child
. To get Autoscroll, I've set AutoScroll to True in my Parent
, and ensured that the Child
is large enough that I can resize the Parent
to be smaller than it. My Parent
is contained inside a Form
and is anchored to all four edges. The problem is that I cannot seem to get the scrollbars to appear during runtime.
I cannot display a control without a form, of course, unless it's in Designer. In Visual Studio 2008 Designer, the Parent
Autoscrolls perfectly: I can resize the control, and whenever its Child
is partially hidden by the edge of Parent
, the scrollbars appear. However, when viewing the control in either the Form
's designer or during runtime, the scrollbars do not appear, no matter how I resize the Parent
.
This seems like a bug, but feels more like I'm missing something obvious. Something about being a child of the Form
seems to be inhibiting the AutoScroll.