PDA

View Full Version : wrap tab title?



dekely
1 Oct 2013, 10:39 AM
Hi All,
I have a lot of tabs, some of them with short title ans some with long.
Can I wrap the tab title so if the title is too long it will start a new line?

Thanks
Dekel

slemmon
3 Oct 2013, 11:31 AM
I haven't tried this with any browser other than Chrome so you may want to test before using, but setting the tabBar to height: 'auto' and using <br> in the title seems to work for me. But, only works if you have <br> and two lines of text in all tabs. You might play with setting the tab's height explicitly as well.

https://fiddle.sencha.com/#fiddle/pq



Ext.create('Ext.tab.Panel', {
width: 400,
height: 400,
renderTo: document.body,
tabBar: {
style: {
height: 'auto'
}
},
items: [{
title: 'Foo<br>Foo again'
}, {
title: 'Bar',
tabConfig: {
// title: 'Custom Title',
title: 'Custom<br>Title',

tooltip: 'A button tooltip'
}
}]
});