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. View Code : Copy code The 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 precedingProgramGenerate 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.

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: 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.