Home  >  Article  >  Web Front-end  >  Learn how to use ExtJS fit layout_extjs

Learn how to use ExtJS fit layout_extjs

WBOY
WBOYOriginal
2016-05-16 18:45:12898browse

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

Copy code The code is as follows:

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"}
]
}
);
});
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn