The dock attribute of the control in. Net winform (the Z-order dock of the dock)

Source: Internet
Author: User

This article from: http://www.cnblogs.com/zhangjidong/archive/2005/09/07/231821.html

 

We all know that the dock attribute of the control in winform is used to"Gets or sets the edge of the parent container to which the control is docked."
We often use it to set the layout of controls,

However, if you are not familiar with this attribute, you may encounter headaches:
A simple layout means that the layout is poor and cannot reach the intended effect. This problem often ignores a feature of the dock.Controls are docked in Z order", What is Z sequence? There is a description in msdn:
The Z-order is the visual hierarchy of controls on the form along the z-axis (depth) of the form..
That is to say, the control isLayer by layer stacked on the form", The closer the control is to the form, the higher the priority, the higher the docking priority. Controls that are far away will be docked in the rest of the space after the closer controls are docked.
To achieve the following results:
1 drag treeview1, tabcontrol1, progressbar1
2. Right-click the component and place it on the top or bottom to adjust the control sequence from near to far from the form to progressbar1, treeview1, and tabcontrol1.
3. Set the dock attributes of progressbar1, treeview1, and tabcontrol1 to bottom, left, and full.

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.