I have a pretty simple winforms application. It contains a rich edit box, embedded browser, progress bar, a few buttons etc.
I have the anchors on the controls set to expand in all directions.
When expanding up and down, however, the controls will overlap one another. How do I prevent this from happening?
Thanks
你最好的办法是在你的表单中添加一个TableLayoutPanel
,其中包含“布局网格”,它应该停靠在表格中,然后你可以将你的控件添加到表格的单元格中(它们可以覆盖多个行和列,这样你就可以得到你想要的布局)。
You must set the property Autosize=true
on every control, especially on the main form.
Note that some controls like TabControl
have this property, but you can't see it with intellisense (Attribute Browseable=false
).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.