PDA

View Full Version : syncSize not working for Window



wpichler
26 Nov 2007, 11:38 AM
Hi all,

they following code does produce a very small window - and not a window with the right width and height. Can anyone tell me whats wrong about it ?

I have already tried various combinations with width:'auto', height:'auto', autoWidth:true, autoHeight:true and the doLayout function - but did not got the result i was expecting. The syncSize function does produce different results before the show function as after the show function...

so here the code:



var createShowWindow = desktop.createWindow({
id: 'sts_show_createshow',
layout:'fit',
title:'Neue Show',
width:400,
height:500,
plain:true,
autoScroll:false,
resizable:false,
collapsible:false,
maximizable:false,
minimizable:false,
closable:false,
shim:false,
modal:true,
animCollapse:false,
items: new Ext.form.FormPanel({
url:'helpers/desktop.php',
baseParams:{cpaint_function:'createShow'},
items:[{
layout:'form',
items:[{
xtype:'textfield',
fieldLabel: 'Show Name',
name: 'name',
allowBlank:false
},{
xtype:'textfield',
fieldLabel: 'ID',
name: 'identifier',
allowBlank:false
}]},{
labelAlign: 'top',
layout:'form',
items:[{
xtype:'htmleditor',
fieldLabel: 'Beschreibung',
name: 'description',
height:200
}]
}],
buttons: [{
text:'Speichern',
handler:submitNewShow,
scope:this
},{
text: 'Abrechen',
handler:cancelNewShow,
scope:this
}]
})
});
createShowWindow.center();
createShowWindow.show();
createShowWindow.syncSize();