ExtJS Tab里放Grid高度自适应问题,官方Perfect方案。
2013-07-24 15:05
483 查看
出处:http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/layout-browser/layouts/combination.js
// A common mistake when adding grids to a layout is creating a panel first,
// then adding the grid to it. GridPanel (xtype:'grid') is a Panel subclass,
// so you can add it directly as an item into a container. Typically you will
// want to specify layout:'fit' on GridPanels so that they'll size along with
// their container and take up the available space.
大致意思是Grid是Panel的子类,不需要用Panel再包Grid了,这样做的话,会导致Grid的Fit布局,不能奏效了。
示例页面:http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/layout-browser/layout-browser.html
选左边树上的Combination Examples下的Tabs With Nested Layouts
选Foo页的Inner Tab 2,这下边有个“下置标签选项卡”,再选择“Nested Grid”,就能Grid自适应的效果。
注意:因为Panel有closable属性,Grid是子类,当然也有啦。原来Grid也是可以“关闭”的啊!
// A common mistake when adding grids to a layout is creating a panel first,
// then adding the grid to it. GridPanel (xtype:'grid') is a Panel subclass,
// so you can add it directly as an item into a container. Typically you will
// want to specify layout:'fit' on GridPanels so that they'll size along with
// their container and take up the available space.
大致意思是Grid是Panel的子类,不需要用Panel再包Grid了,这样做的话,会导致Grid的Fit布局,不能奏效了。
示例页面:http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/layout-browser/layout-browser.html
选左边树上的Combination Examples下的Tabs With Nested Layouts
选Foo页的Inner Tab 2,这下边有个“下置标签选项卡”,再选择“Nested Grid”,就能Grid自适应的效果。
注意:因为Panel有closable属性,Grid是子类,当然也有啦。原来Grid也是可以“关闭”的啊!
相关文章推荐
- Extjs之gridPanel的高度自适应问题解决方法
- ExtJs关于grid高度自适应浏览器的问题解决办法
- ExtJs关于grid高度自适应浏览器的问题解决办法
- Ext的Grid自适应问题解决方案
- 导航面板[ExtJS4]ExtJS4左边菜单面板收缩展开,右边TabPanel内容动态更新(解决宽度不能自适应问题)
- extjs tablepanel 高度自适应问题
- Ext的Grid自适应问题解决方案
- [ExtJS4]ExtJS4左边菜单面板收缩展开,右边TabPanel内容动态更新(解决宽度不能自适应问题)
- iframe自适应高度问题解决方案
- extjs tablepanel 高度自适应有关问题
- iframe高度自适应问题解决方案
- iframe宽高度自适应问题解决方案
- Asp.Net MVC结合ExtJs gridPanel 分页和高度自适应
- 解决angular-deckgrid高度不均衡和重加载的问题
- 手机滑屏tab菜单自适应高度,菜单内容级联滑动(tab超过屏幕宽度可自动滑动)
- EXTJS Grid自适应浏览器
- DIV+CSS左右列高度自适应问题
- 关于tableview自适应高度的问题
- 浮动布局中解决父盒子高度自适应问题
- iOS UITextView自适应高度UITextContainerView抖动问题