mrid
mrid

Reputation: 5796

C# winform panel not showing scrollbar

I've already seen similar questions but still could not get it to work

I have the following controls on my Form (refer image):

A: a groupbox
B: another groupbox
C: a panel which contains A and B

Height of the panel is adjusted on window resize. I have tried using Autoscroll = true on the panel but the scrollbars won't show.

The groupbox A is anchored to Top Left and has dock Top. The groupbox B is anchored to Top Leftbut has dockFill`.

Any idea why the scrollbar isn't showing ?? Also, What dock property should I give to new controls ( groupbox, maybe ), if I plan on adding more of them. I would want to show them one below the other.

enter image description here

Upvotes: 1

Views: 5686

Answers (1)

Phillip
Phillip

Reputation: 817

Make your GroupBoxes To dock Top both. and turn autoscroll on true for your panel. That way they will stack on each other expanding themselfs down and ignoring the panel height. Also set a minheight and minwidth for both so if the panel gets to small it will start so overflow and show the scrollbars.

Upvotes: 0

Related Questions