Winform form (5)-layout mode, winform form

Source: Internet
Author: User

Winform form (5)-layout mode, winform form

I. Default Layout

★You can add a panel or not;

★By dragging the control, you can layout it based on your own ideas. There will be alignment lines during the drag of the control for easy operation;

★You can also select the control to be laid out. You can select an alignment tool in the toolbar, or you can adjust the size of each control.

Note: Layer: Right-click the control. You can choose to place it on the top or on the top.

Lock control: when some la s are completed, you can right-click the layout control and lock the control to disrupt the layout for incorrect operations. In this way, the layout control cannot be dragged at will.

 

Ii. Border Layout

★Attribute Anchor: defines the edge of a control bound to the container. When the control is anchored to an edge, the distance between the control edge closest to the specified edge and the specified edge remains unchanged.

★Dock attribute: generally used with panel

Top: Top, height unchanged, left and right (width) Stretch (when pulling the form)
Bottom: Bottom, height unchanged, left and right stretch (when pulling the form)
Fill: Fill the entire area
Left: Left, unchanged in width, stretched up and down (when pulling the form)
Right: Right. The width remains unchanged. It is stretched up and down (when the form is pulled)

 

3. Flowlayoutpanel)

It is also a panel. The difference from a normal panel is that the controls in it will flow in a certain direction (layout)

★Property FlowDirectiaon: LeftToRight from left to right

Top-down TopDawn

RightToLeft

BottomUp from bottom up

 

Iv. grid layout (table layout TablelayPanel)

By default, two rows and two columns are supported. You can add rows or columns by yourself.

After creating a table, you can add controls to the table.

 

5. Card layout (TabControl)

Tab, for example:

 

6. Split the layout (SplitContainer)

★Attribute orientation: Adjust the splitting method to determine whether the splitter is horizontal or vertical.

Vertical: Vertical; Horizontal: Horizontal

★The split line can also be dragged after the form is started.

The split layout is as follows:

Related Article

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.