1. Fit layout, the child elements will automatically fill the entire parent container (setting the width of the element has no effect). If there are multiple child elements in the container component, only the first child element will be displayed.
2. Application examples
Ext.onReady(function (){
new Ext.Panel({
renderTo:Ext.getBody(),
title:"Container Component",
layout:"fit",
width:500,
height:100,
items:[{title:"Sub-element 1",html:"This is the content in sub-element 1"},
{title:"Sub-element 2",html:" This is the content in child element 2"}
]
}
);
});