爱猫的狗

拥抱变化

导航

Microsoft Windows Forms QuickStarts Tutorial - Getting Started

http://samples.gotdotnet.com/quickstart/winforms/

Dynamic Layout in Windows Forms

1。Anchoring

      When a control is anchored to the edge of its container, the distance between the control and the specified edge remains constant when the container is resized. A control can be anchored to any combination of the edges of the container. If the control is anchored to opposite edges of its container, it is resized when the container is resized.


2。Docking

      When a control is docked to the edge of its container, it remains in contact with that edge when the container is resized. If multiple controls are docked to one edge, the first is docked to the edge of the container, and the others are docked as close as possible to the edge without covering the others.

3。Custom Layout

      You can write your own layout manager by using the Layout event that is exposed on the Control class. This event is raised whenever any event occurs that causes the control to display child controls. These events include Resize, show/hide child controls, and add/remove child controls. This event should be used to perform any custom layout logic.



posted on 2005-10-30 22:20  anf  阅读(194)  评论(0编辑  收藏  举报