I want to anchor 3 GroupBox
. First and third GroupBox
, both contains only 1 DataGridView
. Second GroupBox
contains buttons
and textboxes
. First GroupBox
should be to the left side of Panel
, second GroupBox
should be in center, third GroupBox
should be right. First and Third GroupBox
should be able to grow, second GroupBox
need to keep position.
For second: GroupBox
I anchor it to bottom and top. It keep position and grow only in Height - that' what I want.
For first and third GroupBox
I don't have solution yet. I tried so many combination but I didn't find correct.
Maybe it isn't the best solution but it worked for me. I used TableLayoutPanel
.
TableLayoutPanel
to Main panel
.ColumnCount
to 3.RowCount
to 1.TableLayoutPanel
. In each Boxes add 1 GroupBox
. Dock
property for each GroupBox
to Fill
.Edit Rows and Columns
in TableLayoutPanel Tasks
Value
and Size Type
for each Column
. In my case I put for first and third Column
: Size Type
= Percent, Value
= 50. For second Column
I put Size Type
= AutoSize. So now I get what I want. Thanks to @levelonehuman who give me idea about Layouts
.