Reputation: 236
Step 1 : I am having one window in Extjs.
step 2 : The window is open with Some height and width.
Step 3 : I am clicking on maximize button the window is getting maximized But I don't want that the window to cover the whole screen.On Top, I am having One Toolbar.
Step 4 : By maximizing the window that Toolbar is also getting overlap.
So,Is there is way when I am maximizing the window toolbar should remain nonoverlap
Upvotes: 0
Views: 86
Reputation: 4089
You can achieve it by positioning it below toolbar using position(x,y)
function and then reducing the height of the window by toolbar's height using setHeight()
and getHeight()
functions after maximizing the window.
tools: [{
type: 'maximize',
handler: function (evt, toolEl, owner, tool) {
var toolbarHeight = Ext.ComponentQuery.query('toolbar')[1].getHeight(); //getting height of the toolbar
var window = owner.up('window');
window.maximize( );
window.setPosition(0, toolbarHeight);
window.setHeight(window.getHeight()-toolbarHeight);
}
}]
Upvotes: 1