View Full Version : HOW TO: Resize a Window programmatically - as maximized???
13 Feb 2012, 4:11 PM
I need a *maximized* window to resize programmatically (as the size of stuff around it resizes) - while remaining maximized.
While I'm resizing, the window is changing size as it should be via window.setSize().
But, as soon as I'm done resizing, the window snaps back to what looks like the restore size. Worse, the maximize / restore button indicates it's still maximized.
13 Feb 2012, 4:43 PM
The resize event of the Ext.Window fires one last time, passing in the restored width/height. So, I'm guessing something internal to the Ext JS 4 framework sets the maximized window back to a restored state after I stop resizing it.
13 Feb 2012, 5:07 PM
This appears to have something to do with the Ext.Window's layout. The window's size is the (maximized) size I set it to, but something in the layout is retaining the original size and firing a resize event after I stop resizing to set the window back to its restored size rather than leave it at the maximized size I set it to via window.setSize.
Does anyone know what to do to either reset the layout's height / width it is using? Or avoid the layout from overriding my resized height / width with the original window size???
14 Feb 2012, 8:45 PM
Browsed over the Sencha code some...what's the reasoning for it to hang on to a 'dirty size' and restore the window out of my control?
14 Feb 2012, 10:43 PM
Can you show your code ?
8 May 2012, 2:33 PM
I'm not sure if that's what you are looking for but I figured something today that might help you out.
More details here: http://www.sencha.com/forum/showthread.php?203205-Maximize-widow-to-another-component&p=798769
I hope it helps you out
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.