Learn extjs (10) form layout

Source: Internet
Author: User
I,
The form layout is defined by the class Ext. layout. formlayout and is named form. It is a layout used to manage input fields in a form. This layout is mainly used in Program Create a form field or form element.

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. Code
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: Code
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 " }< br>]
}< br>);

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.