kubens
22 Jul 2007, 5:11 AM
I am not sure if this is a bug. I am working with Ext2.0 revision 769 and I have a strange behaviour pointed out with tab panels. If I assign tabWidth to a tab panel then this attribute is only considered if I have assigned a the width attribute to the tab panel too.
// tabWidth does not work
tab1 = new Ext.TabPanel ({
renderTo:document.body,
activeTab:0,
defaults:{autoScroll: true, autoHeight: true, autoWidth: true},
resizeTabs:true,
minTabWidth:100,
tabWidth:150,
items:[
{title:"Tab 1",autoLoad:"ajax1.htm"},
{title:"Tab 2",autoLoad:"ajax2.htm"},
{title:"Tab 3",html:"html tab3",closable:true},
{title:"Tab 4",html:"html tab4",closable:true}
]
});
// tabWidth works
tab2 = new Ext.TabPanel ({
renderTo:document.body,
activeTab:0,
defaults:{autoScroll: true, autoHeight: true, autoWidth: true},
resizeTabs:true,
minTabWidth:100,
tabWidth:150,
width:900,
items:[
{title:"Tab 1",autoLoad:"ajax1.htm"},
{title:"Tab 2",autoLoad:"ajax2.htm"},
{title:"Tab 3",html:"html tab3",closable:true},
{title:"Tab 4",html:"html tab4",closable:true}
]
});
Br
Wolfgang
// tabWidth does not work
tab1 = new Ext.TabPanel ({
renderTo:document.body,
activeTab:0,
defaults:{autoScroll: true, autoHeight: true, autoWidth: true},
resizeTabs:true,
minTabWidth:100,
tabWidth:150,
items:[
{title:"Tab 1",autoLoad:"ajax1.htm"},
{title:"Tab 2",autoLoad:"ajax2.htm"},
{title:"Tab 3",html:"html tab3",closable:true},
{title:"Tab 4",html:"html tab4",closable:true}
]
});
// tabWidth works
tab2 = new Ext.TabPanel ({
renderTo:document.body,
activeTab:0,
defaults:{autoScroll: true, autoHeight: true, autoWidth: true},
resizeTabs:true,
minTabWidth:100,
tabWidth:150,
width:900,
items:[
{title:"Tab 1",autoLoad:"ajax1.htm"},
{title:"Tab 2",autoLoad:"ajax2.htm"},
{title:"Tab 3",html:"html tab3",closable:true},
{title:"Tab 4",html:"html tab4",closable:true}
]
});
Br
Wolfgang