Extjs4----border布局
2012-09-08 16:12
295 查看
border布局:border布局也称边界布局,他将页面分隔为west,east,south,north,center这五个部分,我们需要在在其items中指定使用region参数为其子元素指定具体位置。
注意:north和south部分只能设置高度(height),west和east部分只能设置宽度(width)。north south west east区域变大,center区域就变小了。
参数 split:true 可以调整除了center四个区域的大小。
参数 collapsible:true 将激活折叠功能, title必须设置,因为折叠按钮是出现标题部分的。
效果图
注意:north和south部分只能设置高度(height),west和east部分只能设置宽度(width)。north south west east区域变大,center区域就变小了。
参数 split:true 可以调整除了center四个区域的大小。
参数 collapsible:true 将激活折叠功能, title必须设置,因为折叠按钮是出现标题部分的。
<script type="text/javascript"> Ext.application( { name:"HelloExt", launch:function() { Ext.create( 'Ext.panel.Panel',//创建一个Panel { title:'border_test', renderTo:Ext.getBody(), width:1200, height:700, layout:'border', //布局为border defaults: { split: true, //有分割线 collapsible: true, //可以折叠 bodyStyle: 'padding:15px' }, items:[ //此处不要忘了“:”号 { region:'north', title:'北', xtype:'panel', height:100, html:'北部' }, { region: 'west', title: '西', xtype: 'panel', html: "西部", width: 100 },{ region:'east', title:'东', xtype:'panel', width:50, html:'东部', },{ region:'center', title:'中', xtype:'panel', html:'中部', }, { region: 'south', title: '南', xtype: 'panel', html: "南部", height: 70 } ] } ) } } ) </script>
效果图
相关文章推荐
- Extjs4布局详解(二)—border布局
- ExtJs学习笔记(10)_Window窗口的Border布局
- 学习ExtJS(八) border布局
- extjs 3.4 border布局
- extjs的border布局在collapse下显示title
- ExtJS----Border区域布局
- ExtJS2.0实用简明教程 - Border区域布局
- 学习ExtJS border布局
- ExtJS 2.0实用简明教程 之Border区域布局
- EXTJS4自学手册——EXT容器布局(Fit,Card,Border)
- ExtJS 2.0实用简明教程 之Border区域布局
- extjs面板布局报错:No center region defined in BorderLayout
- ExtJs布局之border
- ExtJS2.0实用简明教程——Border区域布局
- 学习ExtJS(八) border布局
- EXTJS 3 EXT容器布局(Fit,Card,Border)
- Extjs的布局控件--border布局
- 【ExtJs】利用树状结构、Border布局与标签页刻划OA界面
- ExtJS开发实践之Border布局
- Extjs表单元素实现横向、多列布局,最简单的代码示例