1、代码
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 /**
2 * @author huanghuang
3 */
4
5 Ext.application({
6 tabletStartupScreen: 'tablet_startup.png',
7 phoneStartupScreen: 'phone_startup.png',
8 icon: 'icon.png',
9 glossOnIcon: false,
10 launch:function(){
11 Ext.create("Ext.Panel",{
12 fullscreen:true,
13 dock:'top',
14 items:[
15 //第一项,button
16 {
17 xtype:'panel',
18 layout:'vbox',
19 //width:'50%',
20 docked:'top',
21 items:[
22 {
23 xtype:'button',
24 ui:'normal',
25 text:'Normal'
26 },
27 {
28 xtype:'button',
29 ui:'back',
30 text:'Back'
31 },
32 {
33 xtype:'button',
34 ui:'round',
35 text:'Round'
36 },
37 {
38 xtype:'button',
39 ui:'action',
40 text:'Action'
41 }
42 ]
43 },
44 //第二个项,slider
45 {
46 xtype:'panel',
47 layout:'vbox',
48 width:'100%',
49 //docked:'top',
50 items:[
51 {
52 xtype:'sliderfield',
53 label:'Percentage',
54 labelWidth:'40%',
55 value:50,
56 minValue:0,
57 maxValue:100
58 // useClearIcon:true
59 },
60 {
61 xtype:'sliderfield',
62 label:'Measurement',
63 labelWidth:'40%',
64 value:30,
65 minValue:20,
66 maxValue:80,
67 increment:2
68 }
69 ]
70
71 },
72 //第三项,Email
73 {
74 xtype:'panel',
75 layout:'vbox',
76 // width:'20%',
77 // docked:'top',
78 items:[
79 {
80 xtype:'emailfield',
81 label:'Email address',
82 value:'huanghuang@yahoo.cn',
83 name:'email'
84 },
85 {
86 xtype:'passwordfield',
87 label:'Password',
88 name:'password'
89 }
90
91 ]
92 },
93 ]
94 });
95 }
96 });
2、效果