First, the default layout
★ Can add panel, also can not add;
★ Drag the control by the way of the mouse, according to their own idea layout. The process of dragging the control, there will be alignment of the line, easy to operate;
★ You can also select the controls you want to lay out, have alignment tools available in the toolbar, and tools to resize individual controls.
Note : Layered: Right-click the control. You can choose to place the top level or the top level.
Lock control: When part of the layout is complete, in order to operate the error, the layout of the good, you can select the layout of the control, right-click, lock the control, so that the layout of the control can not be arbitrarily dragged.
Second, the border layout
★ Attribute Anchor: Defines a control bound to the edge of a container. When the control is anchored to an edge, the distance between the edge of the control closest to the specified edge and the specified edge remains the same.
★dock Properties: General fit Panel use
Top: Up, height constant, left and right (width) stretch (when pulling the form)
Bottom: Bottom, height constant, left and right stretch (when pulling form)
Fill: Fills the entire area
Left: Right, width unchanged, stretched up and down (when pulling the form)
Right: Left, width unchanged, stretched up and down (when pulling the form)
Three, Flow-type layout (FlowLayoutPanel)
is also a panel, the difference from a normal panel is that the controls inside it will flow in a certain direction (layout)
★ Attribute Flowdirectiaon:lefttoright from left to right
Topdawn from top down
RightToLeft from right to left
Bottomup from bottom to top
Four, grid layout (table layout tablelaypanel)
The default is two rows and two columns, and you can add rows or columns yourself.
Once you have completed the table, you can add controls to the table.
Five, card layout (TabControl)
tab, such as:
Six, split layout (SplitContainer)
★ Attribute Orientation: Adjust the split mode to determine whether the splitter is horizontal or vertical
Vertical: Vertical; Horizontal: Horizontal
★ Split lines are also available for dragging after the form is started
The split layout is as follows:
WinForm Layout method