问题
I have a form app. inside I have a richTextBox. How to make make the app to auto resize the rich textBOx? meaning if I expand or max the window, rich textBox should follow
回答1:
Use your TextBox's Anchor property. You'll probably want to set it to all sides, Top, Bottom, Left, Right.
回答2:
If the RichTextBox is the only control you can set it's Dock property to Fill. If it shares the form with other controls you can use the Anchor property.
If you need more help with GUI layout in Visual Studio see Designing Resizable Windows Forms in Visual Studio .NET.
来源:https://stackoverflow.com/questions/8001797/c-sharp-form-auto-resize-window