PDA

View Full Version : [CLOSED]Tab Panel: Layout Bug



James Goddard
23 Feb 2011, 6:47 AM
When adding a tab to a tabpanel via add, the content is rendered over the tabs as shown below:
24810.

Here is what I've been able to deduce:


This does not occur if the tab is added in the initial config
Clicking on a new tab in the inner tabpanel cause the layout to correct itself
This will also happen if the tab is of type "panel" as long as it continues to contain sub-items



Ext.onReady(function() {
var panel = new Ext.create ( 'Ext.tab.TabPanel', {
region: 'center',
renderTo: Ext.getBody(),
width: 600,
height: 350
});

var t = Ext.create ( 'Ext.tab.TabPanel', {
title: 'Test 1',
items: [{
title: 'Test 2',
flex: 1
}, {
title: 'Test 3',
flex: 1
}]
});
panel.add (t);
panel.setActiveTab (t);

evant
23 Feb 2011, 4:02 PM
A TabPanel must use a card layout, it's assumed in various places throughout the code.

James Goddard
23 Feb 2011, 4:44 PM
Actually the hbox was a leftover from testing it with a panel. It fails without the hbox and with a panel instead of a tab panel for the inner item.


This will also happen if the tab is of type "panel" as long as it continues to contain sub-items

evant
23 Feb 2011, 5:41 PM
In this case it looks as though it's since been resolved. Should see it in the next release.