2013-04-10 34 views
1

在ExtJS 3.4中,用于实现collapsible:truetitleCollapse:true的TabPanel启用TabPanel的折叠和展开。但是,即使点击标签也会导致折叠/展开。title在TabPanel中的Extjs 3.4中的折叠

如何避免这种情况?

var tabs2 = new Ext.TabPanel({ 
    collapsible:true, 
    titleCollapse:true, 
    renderTo: document.body, 
    activeTab: 0, 
    width:600, 
    height:250, 
    plain:true, 
    defaults:{autoScroll: true}, 
    items:[{ 
      title: 'Normal Tab', 
      html: "My content was added during construction." 
     },{ 
      title: 'Ajax Tab 1', 
      autoLoad:'ajax1.htm' 
     },{ 
      title: 'Ajax Tab 2', 
      autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'} 
     },{ 
      title: 'Event Tab', 
      listeners: {activate: handleActivate}, 
      html: "I am tab 4's content. I also have an event listener attached." 
     },{ 
      title: 'Disabled Tab', 
      disabled:true, 
      html: "Can't see me cause I'm disabled" 
     } 
    ] 
}); 

回答

0

删除titleCollapse:true, property。标题标题在标题元素内呈现,当您打开titleCollapse属性时,您的按钮也可用作展开/折叠按钮。

+0

我同意但我的要求是在标题栏上的任意位置点击Tabpanel。 – JackAss 2013-04-10 15:07:13