extjs-添加对应的组件

来源:互联网 发布:淘宝活动第三方平台 编辑:程序博客网 时间:2024/05/29 19:23

1.添加按钮:

                           margin: '10 20 0 80',

                            xtype: 'button',

                           text: '搜索',

                            width: 80,

                            itemId:'queryItemId',

                            // enableToggle:true,

                            handler:dciGlobeCoordinate.StartQuery

 

2.添加文本框:

                           xtype: 'textfield',

                            margin: '10 0 0 5',

                           fieldLabel: 'x坐标',

                            editable: false,

                            width: 220,

                            labelWidth: 40,

                            allowBlank:false,        //不允许为空

                           blankText: '请输入x坐标',

                            regex:/^\d+(\.\d{1,20})?$/,//允许出现小数点后20位

                           regexText: '请输入数字',

                            shadow: false,

                            listeners: {

                                change:function (textfield, value) {

}

}

 

添加时间field

                            xtype: 'datefield',

                            margin: '3 0 0 5',

                            itemId:'dateItemId',

                           fieldLabel: '日期',

                            minDate:'1/1/1800',

                            format: 'Y/m/d',

                           invalidText: '日期格式无效',

                            editable: false,

                            width: 235,

                            labelWidth: 60,

                            shadow:false,

                            listeners: {

                                //'change':'onAnalysisParamChange'

                            }

 

添加数字field

                          xtype: 'timefield',

                            margin: '3 0 0 5',

                            itemId:'timeItemId',

                           fieldLabel: '时间',

                           invalidText: '时间格式无效',

                            format: 'H:i:s',

                            increment: 30,

                            editable: false,

                            width: 235,

                            labelWidth: 60,

                            shadow: false,

                            listeners: {

                                //'change':'onAnalysisParamChange'

                            }

 

 

3.添加checkbox

                                   xtype: 'checkbox',

                                     //padding:10,

                                     margins:'0 0 0 10',

                                     itemId:'openUndergroundModeItemId',

                                     //bind: {

                                     //    checked: '{isCirculation}'

                                     //},

                                     checked:true,

                                    boxLabel: '地下模式',

                                     handler:dciGlobeUnderGround.openUndergroundMode

 

4.添加进度条

 

                                     xtype:'slider',

                                     itemId:'sliderId',

                                     margin:'10 5 10 5',

                                    fieldLabel: '透明度',

                                    minvalue:0,

                                    maxvalue:255,

                                     width:211,

                                    labelWidth: 60,

                                     shadow:false,

                                     listeners:{

                                       

                                        'change': function (slider, value) {

}

}

原创粉丝点击