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>);