Learn ExtJSform layout _ extjs

Source: Internet
Author: User
ExtJSform layout instructions. For more information, see. 1. Form layout is composed of class Ext. layout. formLayout is defined as form, which is used to manage the layout of input fields in a form. This layout is mainly used to create form fields or form elements in a program.
HideLabels: tru indicates to hide tags. The default value is false.
LabelAlign: The tag teams are left, right, and center. The default value is left.

The Code is as follows:


Ext. onReady (function (){
Var _ panel = new Ext. Panel ({
Title: "personnel information ",
RenderTo: Ext. getBody (),
Frame: true,
Width: 500,
Height: 300,
Layout: "form ",
HideLabels: false,
LabelAlign: "right ",
Height: 120,
DefaultType: 'textfield ',
Items :[
{FieldLabel: "name", name: "name "},
{FieldLabel: "Enter the address", name: "address "},
{FieldLabel: "Enter the phone number", name: "tel "}
]
}
);


Ii. In practical applications, the Ext. form. FormPanel class uses the Form layout by default. Therefore, we can directly use FormPanel. The preceding example can be rewritten as follows:

The Code is as follows:


Ext. onReady (function (){
Var _ panel = new Ext. FormPanel ({
Title: "personnel information ",
RenderTo: Ext. getBody (),
Frame: true,
Width: 500,
Height: 300,
HideLabels: false,
LabelAlign: "right ",
Height: 120,
DefaultType: 'textfield ',
Items :[
{FieldLabel: "name", name: "name "},
{FieldLabel: "Enter the address", name: "address "},
{FieldLabel: "Enter the phone number", name: "tel "}
]
}
);

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.