ExtJS Tab里放Grid高度自适应问题,官方Perfect方案。

出处: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也是可以“关闭”的啊!

转载于:https://www.cnblogs.com/rgqancy/p/3210723.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值