PDA

View Full Version : Bug? TabPanel inside multiple Panels



beetree
5 Sep 2011, 8:58 AM
Hi,

I think that this might be a bug but not sure. I have reduced the code into the following:



var mySubView = new Ext.TabPanel({
layout: 'card',
items: [{
title: "myTitle",
html: "Hello World"
}]
});

var myView = new Ext.Panel({
items: [
mySubView
]
});

Ext.setup({
onReady: function() {
rootPanel = new Ext.Panel({
fullscreen: true,
layout: 'card',
items: [myView],
});
}
});


This does not display the text "Hello World" but it displays the tab "myTitle".

But, if I switch out myView to directly displaying mySubView, e.g. the following code:



var mySubView = new Ext.TabPanel({
layout: 'card',
items: [{
title: "myTitle",
html: "Hello World"
}]
});

var myView = new Ext.Panel({
items: [
mySubView
]
});

Ext.setup({
onReady: function() {
rootPanel = new Ext.Panel({
fullscreen: true,
layout: 'card',
items: [mySubView],
});
}
});


Then "Hello World" is displayed.

Why is this? My take is that TabPanel's doesn't work inside multiple Panels? Not sure though... Highly possible that I have misunderstood something.

//bee

beetree
5 Sep 2011, 9:12 AM
I knew it. I'm fail. Putting fullscreen: true on the TabPanel solves the problem.