Reputation: 243
Currently when I maximize my form it resizes as it looks below.
This is due to the anchoring element stretching the two bottom panels on the left as well as causing a gap on the right since nothing is anchored right. I could fill the gap on the right by anchoring the right most panel however that would just cause it to be wider than all the other panels.
What I want is an equal resizing of the panels when the form is maximized as depicted below
How can this be achieved?
Upvotes: 0
Views: 1145
Reputation: 32453
Use TableLayoutPanel
:
Add TableLayoutPanel
to the form and set Dock = Fill
Add 2 rows to the TableLayoutPanel
(by default there is already two)
Add 4 columns to the TableLayoutPanel
(by default there is already two)
Four panels on the left side put inside every cell of first and second columns and set Dock = Fill
Two panels on the left side put in the third and forth columns of the first row, set RowSpan = 2
and Dock = Fill
Upvotes: 1