PDA

View Full Version : Window displays too large (height)



[Daniel]
6 Aug 2010, 9:04 AM
Hi everyone,

please have a look at the screenshot, it will say everything. The window just renders too large.


21827

Here's my code:


var forgotWindow = new Ext.Window({
renderTo: document.body,
title: 'Passwort vergessen',
resizable: false,
modal: true,
width: 400,
minHeight: 0,
items: new Ext.form.FormPanel({
border: false,
padding: 5,
defaults: {
xtype: 'textfield',
anchor: '-10'
},
items: [{
fieldLabel: 'E-Mail',
name: 'email'
}],
buttons: [{
text: 'Abbrechen',
handler: function() {
this.ownerCt.ownerCt.hide();
}
},{
text: 'Neues Passwort anfordern',
handler: function() {

}
}]
})
});I'm sorry if this was already asked thousands of times ago, but I did not know which keywords to search for (except "window too large" and so on, which did not give helpful threads).

Thanks for your help :)

// Edit:

I've just realized that I forgot to set the layout to fit (which makes sense imo).
After moving the buttons to the window, it looks a little better, but the problem is still the same (or at least a similar one):

21828

And here the new code:


var forgotWindow = new Ext.Window({
renderTo: document.body,
title: 'Passwort vergessen',
resizable: false,
modal: true,
width: 400,
layout: 'fit',
items: new Ext.form.FormPanel({
border: false,
padding: 5,
autoHeight: true,
defaults: {
xtype: 'textfield',
anchor: '-10'
},
items: [{
fieldLabel: 'E-Mail',
name: 'email'
}]
}),
buttons: [{
text: 'Abbrechen',
handler: function() {
this.ownerCt.ownerCt.hide();
}
},{
text: 'Neues Passwort anfordern',
handler: function() {

}
}]
});

mankz
6 Aug 2010, 12:28 PM
The window will not adapt its height to its content. You'll have to specify a height at construction time.

darthwes
6 Aug 2010, 2:46 PM
Daniel, I see well sized windows in IE, FF, and Chrome that do not match your images attached!

[Daniel]
7 Aug 2010, 1:20 AM
Morning,

maybe I shouldn't say that but the problem was a CSS script file of the framework which I forgot to remove... It added paddings/margins to tables...

Sorry for wasting your time and thank you for your help.

Solved!