Automatic resizing of container panel containing custom ExtJS 4.2 form field?
我有一个基于
我已经尝试过创建一个这样的字段,但是基于包含网格和按钮的Panel。将该面板放入
这是一个小提琴,在这里您应该很容易理解我的意思:
http://jsfiddle.net/amx9j/
我终于开始工作了!
在此处查看此小提琴:http://jsfiddle.net/amx9j/3/
1 2 3 4 5 6 7 8 9 10 | layout: { type: 'vbox', align: 'stretch' }, items: [{ xtype: 'container', layout: 'anchor', items: [{ //custom fields that change their height }] |
并且在自定义字段中,每次您希望高度发生变化时,都必须使用
1 2 3 4 | onResize: function(w, h) { this.callParent(arguments); this.grid.setWidth(w - this.getLabelWidth()); } |
重要的是,不要设置网格的高度;-)
感谢@Peter花时间研究这个问题!