- var tabs = new Ext.TabPanel({
- renderTo: 'tabs1',
- width:450,
- activeTab: 0,
- frame:true,
- defaults:{autoHeight: true},
- items:[
- {contentEl:'script', title: 'Short Text'},
- {contentEl:'markup', title: 'Long Text'}
- ],
- initEvents : function(){
- Ext.TabPanel.superclass.initEvents.call(this);
- this.on('add', this.onAdd, this, {target: this});
- this.on('remove', this.onRemove, this, {target: this});
- this.mon(this.strip, 'mousedown', this.onStripMouseDown, this);
- this.mon(this.strip, 'contextmenu', this.onStripContextMenu, this);
- if(this.enableTabScroll){
- this.mon(this.strip, 'mousewheel', this.onWheel, this);
- }
- //ADD:monitor title dbclick
- this.mon(this.strip,'dblclick',this.onTitleDbClick,this);
- },
- //ADD: handler
- onTitleDbClick:function(e,target,o){
- var t = this.findTargets(e);
- if (t.item.fireEvent('beforeclose', t.item) !== false) {
- t.item.fireEvent('close', t.item);
- this.remove(t.item);
- }
- }
- });
extjs tabpanel 双击事件
最新推荐文章于 2021-08-25 16:49:30 发布