PDA

View Full Version : Window Height not Setting



ProfK
25 Feb 2009, 6:50 AM
I'm using an Ext.Window as a pop-up, which usually contains a managedIFrame ux, but even with a plain, blank HTML page, whatever height I pass to my show() method is ignored, and the window retains a height of about 200px, which is my default. Please note that the default is being overridden, because when I call
getIframeWindow().show({width: '800px', height: '500px'}), the console.log statement in my code logs a window height of 800. Even when I remove my default 200, my passed in height is still ignored. What am I doing wrong in this function:


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 : '_blank.htm'
}]
});
console.log(win.height);
win.show();
},
hide : function(){
if (win){
win.hide();
Ext.getBody().unmask();
}
}
}
}

evant
25 Feb 2009, 6:56 AM
They should be numbers, not strings.

Animal
25 Feb 2009, 7:39 AM
But think about that function.

"win"? a global variable?

What is the purpose of that object returned?

ProfK
25 Feb 2009, 7:50 AM
They should be numbers, not strings.
Thank you! All fixed now.

Animal
25 Feb 2009, 7:53 AM
Well not quite.