For completeness, and my own reference, I had to solve this same problem for more complex component nesting. Again, the issue I struggled with was getting a vertical scrollbar in individual tabs as necessary.
Tabpanel nested within a form
http://www.troywolf.com/sencha_issue...scrollbar.html
Code:
Ext.onReady(function(){
var ui = new Ext.Viewport({
layout : "border",
items : [{
region : "center",
title : "Center Region",
layout: 'fit',
items : [{
xtype: 'form',
labelAlign: 'top',
layout: 'fit',
border: false,
items: [{
xtype: 'tabpanel',
border: false,
activeTab: 0,
defaults: {bodyStyle: 'padding: 10px;'},
items : [{
layout: 'form',
title : "Who are you?",
autoScroll : true,
items: [
{html: 'Size the overall window so that the contents here do not fit.<br /><br />', border: false},
{xtype: 'textfield', name: 'fname', fieldLabel: 'First Name'},
{xtype: 'textfield', name: 'lname', fieldLabel: 'Last Name'},
{xtype: 'textfield', name: 'age', fieldLabel: 'Age'},
{xtype: 'textfield', name: 'shoesize', fieldLabel: 'Shoe Size'}
]
}, {
layout: 'form',
title : "Identity Theft",
autoScroll : true,
items: [
{xtype: 'textfield', name: 'ssn', fieldLabel: 'SSN#'},
{xtype: 'textfield', name: 'maiden', fieldLabel: "Mother's Maiden Name"},
{xtype: 'textfield', name: 'bday', fieldLabel: 'Birth Date'}
]
}, {
layout: 'form',
title : "Monty Python",
autoScroll : true,
items: [
{xtype: 'textfield', name: 'favecolor', fieldLabel: 'Favorite Color'},
{xtype: 'textfield', name: 'airspeed', fieldLabel: 'Average Air Speed of a Laden Swallow'}
]
}]
}],
buttonAlign: 'center',
buttons: [
{text: 'Cancel'},
{text: 'Save'}
]
}]
},{
region : "south",
title : "South Region",
height : 200,
bodyStyle: 'padding: 10px;',
html: 'Problem solved! Vertical scrollbars in the form as needed.'
}]
})
});
TabPanel nested within another Tab
http://www.troywolf.com/sencha_issue...crollbars.html
Code:
Ext.onReady(function(){
var ui = new Ext.Viewport({
layout : "border",
items : [{
region : "center",
title : "Center Region",
layout: 'fit',
items : {
xtype: 'tabpanel',
activeTab: 0,
items : [{
title : "Apple",
layout: 'fit',
items: {
xtype: 'panel',
layout: 'fit',
items : [{
xtype: 'tabpanel',
border: false,
activeTab: 0,
defaults: {bodyStyle: 'padding: 10px;'},
items : [{
title : "Fuji",
autoScroll : true,
html: 'Size the overall window so that the contents here do not fit.<br /><br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo<br />foo'
},{
title : "Granny Smith",
autoScroll : true,
html: 'Tab 2'
},{
title : "Golden Delicious",
autoScroll : true,
html: 'Foo!'
}]
}]
}
},{
title : "Banana",
html: 'Tab 2'
},{
title : "Orange",
html: 'Foo!'
}]
}
},{
region : "south",
title : "South Region",
height : 200,
bodyStyle: 'padding: 10px;',
html: 'Sencha is fun!'
}]
})
});
Enjoy!