Scroll bars and docking

  • Thread starter Thread starter illegal.prime
  • Start date Start date
I

illegal.prime

Hi all, I've managed to simplify my problem down to its bare roots. I
have a Form that contains three panels. All three panels have their
docking set to Top. Inside these panels I have a single UserControl.
The UserControl's right side exceeds the width of the Form, but the
bottom scroll bar does not appear.

However, I can increase the size of the Form and I can see the
remainder of the UserControl. Is there some way to keep these panels
docked to Top and still get the scroll bar to appear when necessary on
the bottom?

Thanks,
Novice
 
It looks like I can force the horizontal scroll bar to appear if I use
AutoScrollMinSize - but this seems a little hacky to me since this
means I have to iterate over all the controls, find the maximum width
of any control and then set my AutoScrollMinSize to that number. Is
this really the "right way" to do this?

Thanks,
Novice
 
Back
Top