Layout Overview of the ExtJS 2.0 practical and concise tutorials _extjs

Source: Internet
Author: User
The ExtJS layout base class is Ext.layout.ContainerLayout, and other layouts inherit the class. The ExtJS container component contains a layout and Layoutconfig configuration property that specifies detailed configuration information for the layout and layout used by the container, and containerlayout is used as the layout by default if the layout of the container component is not specified. The layout is simply to put the elements in the container, some layout needs layoutconfig configuration, others do not need layoutconfig configuration. Look at the code:
Copy Code code 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 we created a panel Panel,panle is a container component, we use layout to specify that the Panel uses column layout. The child elements of the panel are two panels that contain a configuration parameter property that is related to the column layout columnwidth, and their values are 0.5, which is half the width of each panel. Execute the above program to produce the results shown in the following figure:

Some of the container components in Ext have already specified the layout used, such as TabPanel using the card layout, formpanel using the form layout, the table in Gridpanel using the column layout, and so on, when we use these components, You cannot specify additional layouts for these container components.
ExtJS2.0 altogether contains 10 kinds of layout, commonly used layout has border, column, fit, form, card, tabel and so on layout, below we separately to these several layouts makes the brief introduction.

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.