表格布局
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>布局</title>
<link rel="stylesheet" type="text/css" href="ext-4.2.1/resources/css/ext-all.css" />
<script type="text/javascript" src="ext-4.2.1/bootstrap.js"></script>
<script type="text/javascript" src="ext-4.2.1/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
Ext.create('Ext.panel.Panel',{
title:'Ext.panel.container.Table',
layout:{
type:'table', //表格布局
columns:4 //设置表格布局默认列数为4列
},
frame:true,
height:150,
width:250,
renderTo:Ext.getBody(),
defaults:{
bodyStyle:'background-color:#FFFFFF',
frame:true,
width:50,
height:50
},
items:[{
title:'子面板一',
width:150,
colspan:3 //设置跨列
},{
title:'子面板二',
rowspan:2, //设置跨行
height:100
},
{ title:'子面板三'},
{ title:'子面板四'},
{ title:'子面板五'}
]
});
});
</script>
</head>
<body>
</body>
</html>