PDA

View Full Version : tabPanel - plain doesn't work when inside a borderlayout



dekely
31 Aug 2013, 9:53 PM
Hi All,
The plain property doesn't take effect when the tabPanel is inside a border layout.
I have to wrap it in a panel. am I missing something here?



Ext.onReady(function() {


Ext.create('Ext.panel.Panel', {
layout: 'border',
height: 300,
width: 300,
renderTo: Ext.getBody(),
items: [{
region: 'center',
xtype: 'tabpanel',
activeTab: 0,
plain: true, //DOESN'T WORK IN BORDERLAYOUT
items: [{
title: 'Foo',
closable: true
}, {
title: 'Bar'
}]
}]


});

vadimv
1 Sep 2013, 8:57 AM
That's because of the css:



.x-border-layout-ct {
background-color: #dfe8f6;
}


to have that working you have to configure the background of the parent panel:


bodyStyle: {
background: '#fff'
}


p.s don't forget, browser debug tools are your best friend, use it to inspect the elements and see why you don't have the expected result.

dekely
1 Sep 2013, 12:23 PM
thanks!