开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜