uncaught exception: No center region defined in BorderLayout
2012-02-15 16:43
375 查看
在做extjs的开发时遇到这个问题是很正常的,解决的方法如下
如果使用border布局,那么east,west,south,north,center各个模块都必须有明确的高度,也就是height:300,如果写成autoHeight:true,而省略了height:300,那么没有写高度的模块就会与其它模块相互重叠在一起。
本文出自 “博客即日起停止更新” 博客,请务必保留此出处http://sucre.blog.51cto.com/1084905/780632
1 使用Border布局的容器必须 有一个子件在'中心'区域(region:'center')。中心区域的子件将会自动改变尺寸来填充Border布局中没有被使用的其他区域的空间。 (如果不指定会报uncaught exception: No center region defined in BorderLayout XXX 异常) 2 任何west或east区域的子件都必须定义宽度(一个整数代表该区域占用的像素)(如果不指定布局不起作用,并且还会报col is null 的错) 3 任何north或south区域的子件都必须定义高度 4 Border布局的所有区域在被渲染时以及此之后就固定了,其子组件可能无法删除或添加。 5 要添加/删除Border布局内的组件,它们必须是被一个额外的由Border布局直接管理的容器所封装。如果该区域是可收起的(collapsible:true),Border布局管理器直接使用的容器应该是一个Panel。
如果使用border布局,那么east,west,south,north,center各个模块都必须有明确的高度,也就是height:300,如果写成autoHeight:true,而省略了height:300,那么没有写高度的模块就会与其它模块相互重叠在一起。
本文出自 “博客即日起停止更新” 博客,请务必保留此出处http://sucre.blog.51cto.com/1084905/780632
相关文章推荐
- extjs面板布局报错:No center region defined in BorderLayout
- 使用Ext.Window时出现No center region defined in BorderLayout错误的愿原因
- 使用viewport布局控件老是在报"No center region defined in BorderLayout "的错误
- Extjs错误:uncaught exception: No center region defined in BorderLayout ext-comp-1002
- No tag "datetimepicker" defined in tag library imported with prefix "s"
- com.sun.enterprise.deployment.backend.IASDeploymentException: No local string defined -- Inconsistent Module State 错误
- error: Error: No resource found for attribute ‘layout_scrollFlags’ in package‘包名’
- +id/image, already defined earlier in this layout
- UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted sa
- LR安装No Background bmp defined in section General entry BGBmp的解决办法
- 打包出错Duplicate id @+id/image, already defined earlier in this layout Issue
- No resource identifier found for attribute 'headerLayout' in package错误解决方法
- mpociot/laravel-apidoc-generator There are no commands defined in the "api" namespace.
- s:datepicker No tag "datetimepicker" defined in tag library imported with prefix "s
- [Android] Duplicate id @+id/xxx, already defined earlier in this layout
- 运行J2ME工程时 先出现一个no midlets defined in jad file,continue?
- Error: No room left in memory section, Image is too large for defined regions
- RelativityLayout 子控件的几个常用的属性 android:layout_centerHorizontal="true"、 android:layout_centerVertical="true" 、android:layout_centerInParent="true"
- /index.jsp(27,4) No tag "" defined in tag library imported with prefix "s"
- error: Error: No resource found for attribute ‘layout_scrollFlags’ in package‘包名’