日期:2014-05-16 浏览次数:20382 次
Ext.define('My.view.b.Main', { extend: 'Ext.panel.Panel', alias: 'widget.bmain', //height:'100%', layout:{ type:'vbox', align:'center', }, initComponent: function(){ this.items = [{ xtype: 'bform', width:'100%', flex:1 },{ xtype: 'blist', width:'100%', flex:4 }]; this.callParent(arguments); } });
Ext.define('My.view.b.Main', { extend: 'Ext.panel.Panel', alias: 'widget.bmain', height:'100%', layout:{ type:'vbox', align:'center', }, initComponent: function(){ this.items = [{ xtype: 'bform', width:'100%', height:125 //flex:1 },{ xtype: 'blist', width:'100%', //flex:4 }]; this.callParent(arguments); } });
refs:[ { selector:'bmain', ref:'bMain' },{ selector:'blist', ref:'bList', } ], init:function(){ this.control({ 'blist':{ afterrender:this.setListHeight }, }); }, setListHeight: function(me, opts){ me.setHeight(this.getBMain().getSize().height - 135); },
resizeListHeight: function(me, width, height, oldwidth, oldheight ){ this.getBList().setHeight(height-135); },