141106 form Layout

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.