Form layout:
First, absolute positioning (default layout)
Location, anchor properties in each control
Location specify position coordinates
Anchor lock margin, up/down/left/right
Ii. Border Layout (top, bottom, left, right, center)
Properties in each control: Dock
Three, Flow-type layout:
Container control: FlowLayoutPanel
Property:
Outer bounds of controls such as Margin buttons
FlowDirection the Sort method. Selectable: From left to right, top to bottom ...
Four, grid package layout: (Example: Calculator)
Container controls: TableLayoutPanel (in the upper right corner of the small triangle, adjust the row and column).
You can put only one control in each lattice, but you cannot put a container class control.
Property:
Columns
Rows
If you want to cross rows or columns, set the RowSpan and ColumnSpan properties of the controls in the grid.
Five, card layout
Container control: TabControl
When selected, distinguish between the TabControl object and the TabPage object.
Property:
TabPages Collection properties, controlling multiple TabPage objects
Hottrack
TabPages Collection Properties: Controlling multiple TabPage objects
Multiline If there are many tabs, whether multiple lines are displayed.
Alignment the location of the tab
SelectedIndex the index number of the selected TabPage object
Selectedtab the selected TabPage object.
Per card Page object: TabPage
Text: The words on the tab
Hide a tab:
Method One: Sets the parent of the TabPage object to null. Tabpage2.parent=null;
Law two: In the TabPages collection of the TabControl object, use Remove or removeat to remove the tab. Example: TabControl1.TabPages.RemoveAt (1);
Six, the separation bar layout
Container control: SplitContainer
Property:
Orientation the direction of the split. Select split horizontally or vertically.
The controls in the left and right two panel are set to the dock or other layout methods.
141106 form Layout