Region notes when using the border method in ext

Source: Internet
Author: User

When region is used, an error occurs, so I tested it myself.

Code:

Ext. onready (function () {var viewport = new Ext. viewport ({layout: 'border', // html: '<p> step 2, 4 in total </P>', items: [{region: 'north ', split: True, Title: 'north', // north, south, east, west or center) Border: true}, {region: 'west', split: True, title: 'west', border: true}, {region: 'center', split: True, Title: 'center', border: true}, {region: 'east', split: true, Title: 'east', border: true}, {region: 'south', split: True, Title: 'south', border: true}]}) ;});

According to the test results, we can see that the center cannot be empty, and other values can be empty without being set.

Check the API and have the following information:

Borderlayout is fixed and will not change or change the pattern after rendering. The central region is indispensable in borderlayout settings. If there is no other area, the central layout will be the whole area of the layout. The regions of a borderlayout areFixedAt render time and thereafter, no regions may be removed or added. The borderlayout must have a center region, which will always fill the remaining space not used by the other regionsInThe layout.

Summary:

1. center is required. (If ext can be located without the center, we hope it can be solved in the next version)

2. when using other IDES (for example, C #), you can use (top, left, right) and so on to locate the problem. It feels more convenient than the use direction. After all, it is more user-friendly, you do not need to go to the map (Upper North, lower south, left West, right East.

 

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.