开发者

which event should i handle to adjust the size of controls on winform?

开发者 https://www.devze.com 2022-12-23 13:15 出处:网络
when my form is shown, i want to adjust the height of certain contr开发者_如何学JAVAol, i do this in the Shown Event handler, it doesn\'t work, so which event should i handle?The quick answer is, use

when my form is shown, i want to adjust the height of certain contr开发者_如何学JAVAol, i do this in the Shown Event handler, it doesn't work, so which event should i handle?


The quick answer is, use the Layout event. But with .NET 2.0 and up you really have much better tools at your disposal. I would look into the Anchor property, the Dock property, the TableLayoutPanel, FlowLayoutPanel, etc.

It's very rare that you should need to manually layout controls unless you're implementing a custom layout.

0

精彩评论

暂无评论...
验证码 换一张
取 消