当我更改窗口大小或最大化 - 恢复窗口时,是否有表单或组件的任何属性,使用 Visual Studio 创建的 Windows 应用程序的组件将自动排列?如果没有,我该如何手动完成?
问问题
124 次
1 回答
1
There are several. Starting with the Dock and Anchor properties of a control, good for simple layouts with no more than, say, 3 controls across. Then the TableLayoutPanel and FlowLayoutPanel controls, they automatically arrange the controls inside of them. Respectively in a grid and a flow layout.
For the really tough layout cases you could implement the form's Resize event and calculate Location and Size properties yourself. That's rarely necessary.
于 2010-09-06T12:01:59.503 回答