I am new to C# user interface. I have created a window as shown in the first image. But if the user drag the window and make it bigger, I would like for it to make each richTextBox
expand with it as shown in the second image. For example, make the richTextBox4
bigger proportional to the size of the window. Any ideas would be greatly appreciated
Image1:
Image 2:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With