dolittle
13 Apr 2012, 9:21 AM
Hi,
I'm rendering a container with border layout in a div.
I want the container to get the maximum available height - auto height.
There is no autoHeight settings in extjs 4 and the container should use autoHeight if height is not set.
How do I make it work with border layout?
Ext.define('Myapp.view.Main', {
extend: 'Ext.container.Container',
alias: 'widget.myapp.main',
initComponent: function() {
Ext.apply(this, {
renderTo: 'main-wrapper',
layout: 'border',
items: [{
region: 'north',
height: 50,
title: 'north'
}, {
region: 'west',
width: 20,
title: 'nav'
}, {
region: 'center',
width: 800,
title: 'center'
}]
});
this.callParent(arguments);
}
});
Thanks
I'm rendering a container with border layout in a div.
I want the container to get the maximum available height - auto height.
There is no autoHeight settings in extjs 4 and the container should use autoHeight if height is not set.
How do I make it work with border layout?
Ext.define('Myapp.view.Main', {
extend: 'Ext.container.Container',
alias: 'widget.myapp.main',
initComponent: function() {
Ext.apply(this, {
renderTo: 'main-wrapper',
layout: 'border',
items: [{
region: 'north',
height: 50,
title: 'north'
}, {
region: 'west',
width: 20,
title: 'nav'
}, {
region: 'center',
width: 800,
title: 'center'
}]
});
this.callParent(arguments);
}
});
Thanks