我的技術(shù)貼的首發(fā)地址:http://atian25.javaeye.com/

          天豬部落閣 - (ExtJS && AS3 && Java)

          專注于ExtJS && AS3 && Java

          常用鏈接

          統(tǒng)計(jì)

          FLASH

          WORK

          友情鏈接

          最新評(píng)論

          [原創(chuàng)]EXTJS雙擊TabPanel標(biāo)簽關(guān)閉該頁

           1 var tabs = new Ext.TabPanel({  
           2     renderTo: 'tabs1',  
           3     width:450,  
           4     activeTab: 0,  
           5     frame:true,  
           6     defaults:{autoHeight: true},  
           7     items:[  
           8         {contentEl:'script', title: 'Short Text'},  
           9         {contentEl:'markup', title: 'Long Text'}  
          10     ],  
          11     initEvents : function(){  
          12             Ext.TabPanel.superclass.initEvents.call(this);  
          13             this.on('add', this.onAdd, this, {target: this});  
          14             this.on('remove', this.onRemove, this, {target: this});  
          15             this.mon(this.strip, 'mousedown', this.onStripMouseDown, this);  
          16             this.mon(this.strip, 'contextmenu', this.onStripContextMenu, this);  
          17             if(this.enableTabScroll){  
          18                 this.mon(this.strip, 'mousewheel', this.onWheel, this);  
          19             }  
          20             //ADD:monitor title dbclick  
          21             this.mon(this.strip,'dblclick',this.onTitleDbClick,this);  
          22         },  
          23                  //ADD: handler  
          24         onTitleDbClick:function(e,target,o){  
          25             var t = this.findTargets(e);  
          26             if (t.item.fireEvent('beforeclose', t.item) !== false) {  
          27                         t.item.fireEvent('close', t.item);  
          28                         this.remove(t.item);                  
          29                    }  
          30         }  
          31 });

          posted on 2009-07-01 10:23 天豬 閱讀(3024) 評(píng)論(0)  編輯  收藏 所屬分類: JavascriptExtJS


          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 阜城县| 精河县| 民乐县| 逊克县| 广平县| 南雄市| 保亭| 肇源县| 太和县| 炉霍县| 常山县| 南雄市| 乐昌市| 临澧县| 新邵县| 玉溪市| 腾冲县| 河津市| 娱乐| 博乐市| 武鸣县| 闽侯县| 育儿| 江达县| 湟中县| 寿光市| 镇江市| 堆龙德庆县| 开化县| 贵南县| 新沂市| 贵定县| 丹阳市| 深圳市| 海门市| 新干县| 林州市| 曲松县| 高阳县| 塔河县| 峡江县|