Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
9364
Autosizing of stacked GroupBoxes
posted

I have three GroupBoxes stacked on each other in a Usercontrol.

One docked top, another bottom and last one docked to fill using the Control's dock property.

I am having a hard time getting the autohide behavior from happening. When I collapse the top groupbox control, for example, I was expecting the middle one (which has fill dockstyle) to move up and occupy the space. Instead. I find the top  groupbox control collapses leaving an empty background while the middle one stays put.

What am I doing incorrect that is keeping the autosize from happening ? Is there something on the GroupBox I need to do?Or is there something on the UserControl that I am not setting?

Thanks!

 

PS: I was talking to one of my colleagues and he said I need to change the height of the groupbox control everytime the user expands/collapses it. This he believes would make the other controls to autosize accordingly.