Reputation: 16714
I have a form that has a panel in it. I've set the panel anchor and it works great, when I resize the form the panels height is increased.
The problem is: I've got several group boxes in the panel, and when the panel's height is increased, the group box vertical spacing should be increased equally.
How can I do that?
Upvotes: 0
Views: 926
Reputation: 16714
I've just seen this question from a long time ago. The form I was talking about end up with a different interface, but I've recently done something very similar and I did it like this:
Upvotes: -1
Reputation: 11495
Use a TableLayoutPanel and make sure the rows in it are all set to a size mode of "AutoSize". Next, make sure that your boxes you place in the table have a the "Dock" property set to one of the fill modes.
Upvotes: 6