1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Dallas/Fort Worth
    Posts
    43
    Vote Rating
    2
    ben.gillis is on a distinguished road

      0  

    Default Unanswered: HOW TO: Resize a Window programmatically - as maximized???

    Unanswered: HOW TO: Resize a Window programmatically - as maximized???


    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.
    It's just one's and zero's, what could go wrong?

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Location
    Dallas/Fort Worth
    Posts
    43
    Vote Rating
    2
    ben.gillis is on a distinguished road

      0  

    Default


    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.

    Why ?????????????
    It's just one's and zero's, what could go wrong?

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Location
    Dallas/Fort Worth
    Posts
    43
    Vote Rating
    2
    ben.gillis is on a distinguished road

      0  

    Default


    *bump*?

    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???
    It's just one's and zero's, what could go wrong?

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Location
    Dallas/Fort Worth
    Posts
    43
    Vote Rating
    2
    ben.gillis is on a distinguished road

      0  

    Default


    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?
    It's just one's and zero's, what could go wrong?

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Location
    Cuttack,Odisha,India
    Posts
    61
    Vote Rating
    1
    debabrata is on a distinguished road

      0  

    Default


    Can you show your code ?

  6. #6
    Sencha User
    Join Date
    Nov 2011
    Posts
    8
    Vote Rating
    0
    franck87 is on a distinguished road

      0  

    Default


    Hello ben.gillis,

    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/showthre...onent&p=798769

    I hope it helps you out

    F.

Thread Participants: 2