C# form auto resize window

会有一股神秘感。 提交于 2019-12-23 15:45:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!