resizing panel to 100% of Ext.Window

  1. #1

    resizing panel to 100% of Ext.Window

    Hi,

    I have a page that creates a new window during runtime:

    function createWindow(wintitle,myurl) {           
        var window = new Ext.Window({                
                    modal: false,                
    
                    iconCls: 'icon-table',                
    
                    maximizable: true, 
    
                    minimizable:true,               
    
                    title: wintitle, 
                    resizable: true,
    
                    header: true,               
    
                    autoLoad:{maskMsg:"Loading...",
    
                    showMask:true,
    
                    mode:"iframe", 
    
                    url:myurl},                
                    width:825,                
    
                    height:675,                
    
                    bodyStyle: 'background-color: #fff;'           
         });            
         
         window.show();        
    }
    The page that I am loading inside that window is another aspx page in the project that has an Ext.Panel as the root object.

    My question is how can always make sure that the Ext.Panel is 100% the width and 100% the height of the container Ext.Window?

    I am having a hard time getting it to resize when needed. Thanks in advance.

  2. #2

    RE: resizing panel to 100% of Ext.Window

    Hi principal_X,

    You just need to add an <ext:Viewport> as the root, then an <ext:FitLayout> within the Viewport <Body>, then add your Panel inside the FitLayout.


    Hope this helps.


    Geoffrey McGill
    Founder
  3. #3

    RE: resizing panel to 100% of Ext.Window

    Thanks that worked.

Similar Threads

  1. [CLOSED] ViewPort is not resizing inner panel
    By RCM in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 18, 2012, 4:11 PM
  2. [CLOSED] Displaying Error After Resizing the window
    By imaa in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 27, 2011, 10:38 AM
  3. [CLOSED] HBoxLayout not resizing according to window size
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 21, 2011, 4:48 PM
  4. Replies: 2
    Last Post: Oct 14, 2010, 11:05 AM
  5. Center ext:window on window resizing
    By matteo in forum Examples and Extras
    Replies: 1
    Last Post: Oct 03, 2008, 12:35 AM

Posting Permissions