Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ani-chandran/8102608 to your computer and use it in GitHub Desktop.
Save ani-chandran/8102608 to your computer and use it in GitHub Desktop.
A Pen by anichandran.

how-to-minimize-and-maximize-window using extjs-anichandran

how-to-minimize-and-maximize-window anichandran

A Pen by anichandran on CodePen.

License.

<script type="text/javascript" charset="utf-8" src="http://cdn.sencha.io/ext-4.2.0-gpl/ext-all.js"></script>
<link href="http://cdn.sencha.com/ext-4.1.1-gpl/resources/css/ext-all.css" rel="stylesheet" />
Ext.onReady(function () {
Ext.create('Ext.window.Window', {
height: 300,
width: 300,
minimizable: true,
title: 'how to minimize and maximize window using extjs',
listeners: {
"minimize": function (window, opts) {
window.collapse();
window.setWidth(150);
window.alignTo(Ext.getBody(), 'bl-bl')
}
},
tools: [{
type: 'restore',
handler: function (evt, toolEl, owner, tool) {
var window = owner.up('window');
window.setWidth(300);
window.expand('', false);
window.center();
}
}]
}).show()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment