You can also use the weight property to give priority to the region, for example, giving preference to the Western region over the Northern region. All these changes mean that you often donβt need nesting with the border layout, accelerating the rendering of components that use this layout.
Ext.define('MyApp.view.MainViewport', { extend: 'Ext.container.Viewport', layout: { type: 'border' }, initComponent: function() { var me = this; Ext.applyIf(me, { items: [ { xtype: 'panel', region: 'west', weight: -1, width: 150, title: 'My Panel' }, { xtype: 'panel', region: 'north', weight: -2, height: 150, title: 'My Panel' }, { xtype: 'panel', region: 'south', weight: -2, height: 150, title: 'My Panel' }, { xtype: 'panel', region: 'east', width: 150, title: 'My Panel' }, { xtype: 'panel', region: 'center', title: 'My Panel' } ] }); me.callParent(arguments); } });
source share