You can add a TableLayoutPanel
to your Form. Per default this panel has two columns and two rows.
Then you add one TextBox
to each cell and set the Dock
-Property of each TextBox
to Fill
.
The last step thing to do is either set the Dock
-Property of your TableLayoutPanel
to Fill
or set the Anchor
-Property of your TableLayoutPanel
to Left | Right | Bottom | Top
. Then your panel will be resized together with the Form.
All these steps can be done with the designer.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…