title: Need to resize the Ext.Window based on the control render on it
body: <p>I need to resize my popup created by using <code>Ext.Window</code> based on the controls render on it.
  I popup an aspx page and dynamically creating control on it. So i can't hard code the height of the window.</p>
  
  <p>How can I resize the popup window height. Please help me with your valueable information.</p>
  
  <p>My code is as follows.</p>
  
  <pre><code>Ext.onReady(function () {
  
      var myWin = new Ext.Window({
          title: 'Add to Favourit',
          width: 380,
          height: 300,
          closable: true,
          buttonAlign: 'center',
          items: [{
              xtype: 'panel',
              layout: {
                  type: 'hbox',
                  align: 'stretch'
              },
              items: [{
                  xtype: 'box',
                  itemId: 'iFrameInWindow',
                  title: 'IFrame',
                  autoEl: {
                      tag: 'iframe',
                      src: 'forms/test.aspx?id=1'
                  },
                  flex: 1,
                  width: 380,
                  height: 300,
              }],
              listeners: {
                  afterrender: function () {
                    //    
                  },
              }
  
          }]
      });
  
      myWin.show();
  });
  </code></pre>
  
  <p>Thanks in advance.</p>