views:

1486

answers:

2

Regardless of what height argument I use, my window keeps a steady height of about 250px. The console.log statement outputs 600 when I pass 600 to show, e.g. getIFrameWindow().show({height: 600}), so I know my height argument is being passed and received correctly, but my window doesn't render with it's correct height.

getIframeWindow : function () {
    return {
        show :function(args) {
            args=args||{};
            win = new Ext.Window({ 
                width    :args.width||200,
                height   :args.height||200,
                items    :[{
                    border      : false,
                    xtype       : 'iframepanel',
                    defaultSrc  : args.src||'_blank.htm'
                }]
            });
            console.log(win.height);
            win.show();
        },
+1  A: 

try this :

            width    :args.width * 1.0 ||200,
            height   :args.height * 1.0 ||200,

args.width and args.height will become numbers

m_oLogin
Thanks, that would have saved me removing the quotes in all my calls to show(). I just learnt that trick a few weeks ago, but it's all too much JavaScript at once. ;-)
ProfK
A: 

It works fine for me in a simpler test without the iframe.

Of course you have given the Window (Which is a Container) no layout config, so it will perform no sizing of its child items.

Would you like the iframe to be sized along with the Window? You must tell it so!

Animal
Simply passing the window integer and not string sizes worked fine.
ProfK