PDA

View Full Version : TabPanel and different tab widths



mitchellsimoens
7 Feb 2010, 8:39 PM
I have a tab panel and I want the tabs to be different widths but I cannot figure it out. I can change all the tabs widths but not individually. I found a forum post about changing the DOM width so it kind of acts as I want but it doesn't actually change the tab width, just allows the next tab to be moved onto it.

This is the code from that post:

Ext.get(Ext.getCmp("projectTabPanel").getTabEl(0)).setWidth(30);

I also set the width config option on the tab but it didn't do anything that I wanted.

8 Feb 2010, 12:00 PM
Mitchell,

it works for me out o f the box:



[new Ext.Window({
width : 500,
height : 200,
layout : 'fit',
items : {
xtype : 'tabpanel',
activeTab : 0,
items : [
{ title : 'SDFSDFSFDF' },
{ title : 'oifjew' },
{ title : '93939393939393939' }

]
}


}).show()

renders:

http://tdg-i.com/img/screencasts/2010-02-08_1500.png

mitchellsimoens
8 Feb 2010, 3:43 PM
hmm

School wifi won't let me FTP anything! grrr it's like they don't want you doing anything but study in this place! :D

mitchellsimoens
9 Feb 2010, 7:04 AM
I have found out why it wasn't working for me. I had resizeTabs set to true which was increasing the tab size.