Ext.tab.Panel 页签的标题宽度设置

尝试过 、maxTabWidth、以及 resizable 的设置不见效,最后实际生效代码:

var tabPanel = Ext.create('Ext.tab.Panel', {
frame : true,
items: [
{
id:'hotCitySelector_tab_hotCity',
title: '热门城市',
items:[
{
xtype:'button',
text:'成都',
handler:function(){
alert('成都');
}
},
{
xtype:'button',
text:'重庆',
handler:function(){
alert('重庆');
}
}
],
layout:{
type:'table',
columns:'6'
}
},
{
id:'hotCitySelector_tab_province',
title: '省份',
layout:{
type:'table',
columns:'6'
}
},
{
id:'hotCitySelector_tab_city',
title: '城市',
layout:{
type:'table',
columns:'6'
}
},
{
id:'hotCitySelector_tab_area',
title: '区县',
layout:{
type:'table',
columns:'6'
}
}
],
floating: true,
hidden: true,
width : 400,
height: 250,
columnLines : true,
focusOnToFront: false
});

 

//设置页签的宽度
for(var n=0;n<tabPanel.items.items.length;n++){
    var curTab = tabPanel.items.items[n];
    curTab.tab.setWidth(70);
}

 

posted @ 2016-05-11 11:38  WayneSilver  阅读(802)  评论(0编辑  收藏  举报