1. Main configuration items of Ext. Form. fieldset
Configuration item |
Type |
Description |
Checkboxname |
String |
The specified field set is used to show or hide the checkbox name of the field set panel. This attribute takes effect only when checkboxtoggle is set to true. |
Checkboxtoggle |
Boolean |
Set whether to display the checkbox selection box of the field set. You can set this box to hide or display the field set. The default value is false. |
Collapsed |
Boolean |
If it is set to true, the field set is collapsed by default. |
Collapsible |
Boolean |
Set whether the field set can be folded |
Layout |
String |
Field set layout. The default value is "anchor" |
Title |
String |
Field set title |
Labelwidth |
Number |
The width of the field label, which can be cascade to the sub-container. |
2. Ext. Form. fieldset example
Code:
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < Html Xmlns = "Http://www.w3.org/1999/xhtml" > < Head Runat = "Server" > < Title > Ext. Form. Field. fieldset example </ Title > < Link Href = "Ext-4.0.7-gpl/resources/CSS/ext-all.css" REL = "Stylesheet" Type = "Text/CSS" /> < Script SRC = "Ext-4.0.7-gpl/Bootstrap. js" Type = "Text/JavaScript" > </ Script > < Script Type = "Text/JavaScript" > Ext. onready ( Function () {Ext. Create ( " Ext. Form. Panel " , {Title: " Ext. Form. Field. fieldset example " , Frame: True , Width: 220 , Renderto: Ext. getbody (), bodypadding: 5 , Items: [{Title: " Product Information " , Xtype: " Fieldset " , Bodypadding: 5 , Collapsible: True , Defaults: {labelseparator: " : " , Labelwidth: 65 , Width: 175 }, Defaulttype: " Textfield " , Items: [{fieldlabel: " Product Name " }, {Fieldlabel: " Unit Price " }]}, {Title: " Product Description " , Xtype: " Fieldset " , Bodypadding: 5 , Checkboxtoggle: True , Checkboxname: " Description " , Defaulttype: " Textfield " , Items: [{fieldlabel: " Introduction " , Labelseparator: " : " , Labelwidth: 65 , Width: 175 , Xtype: " Textarea " }]}); </ Script > </ Head > < Body > </ Body > </ Html >
: