Layout overview of ExtJS 2.0 practical and concise tutorials

Source: Internet
Author: User

The layout base class of ExtJS is Ext. layout. ContainerLayout. Other layout types inherit this class. The ExtJS container component contains the layout and layoutConfig configuration attributes, which are used to specify the layout and detailed configuration information of the container, if the layout of the container component is not specified, ContainerLayout is used as the layout by default. This layout simply places elements in the container. Some layoutConfig configurations are required, while others do not need layoutConfig configurations. Check the Code:
Copy codeThe Code is as follows:
Ext. onReady (function (){
New Ext. Panel ({
RenderTo: "hello ",
Width: 400,
Height: 200,
Layout: "column ",
Items: [{columnWidth:. 5,
Title: "Panel 1 "},
{ColumnWidth:. 5,
Title: "Panel 2"}]
});
});

The above Code creates a Panel. Panle is a container component. We use layout to specify that the Panel uses the Column layout. The sub-element of this Panel is two panels, both of which contain a configuration parameter attribute columnWidth related to the column layout. Their values are 0.5, that is, the width of each panel occupies half. Execute the above program to generate the result as shown in:

Some container components in Ext have already specified the layout used. For example, TabPanel uses the card layout, FormPanel uses the form layout, and GridPanel uses the column layout. When using these components, you cannot specify another layout for these container components.
ExtJS2.0 has a total of 10 la S. The commonly used la。 s include border, column, fit, form, card, and tabel. Below we will give a brief introduction to these la S.

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.