PDA

View Full Version : some problems about the layout Dialog?



iolerp
16 Aug 2007, 7:40 PM
<div id="addItemDialog"></div>
<div id="addItemForm" style="margin-left:10px;margin-top:10px;margin-right:10px;margin-bottom:5px;display:none"></div>



function test(){

Ext.get('addItemForm').show();

if(!this.dialog){
this.dialog = new Ext.LayoutDialog('addItemDialog',{
modal:false,
width:600,
height:450,
shadow:true,
minWidth:500,
minHeight:350,
proxyDrag:true,
center:{
autoScroll:true,
animate:true
}
});

this.dialog.addKeyListener(27,this.dialog.hide,this.dialog);
this.dialog.addButton(OLERP_FINANCE_ITEM_SAVE,this.dialog.show,this.dialog);
this.dialog.addButton(OLERP_FINANCE_ITEM_CANCEL,this.dialog.hide,this.dialog);
}

if(!this.fs){
this.fs = new Ext.form.Form({
labelAlign:'right',
labelWidth:75,
method:'POST',
url:''
});
this.fs.fieldset(
{legend:OLERP_FINANCE_ITEM_FS_LEGEND},
new Ext.form.TextField({
fieldLabel:OLERP_FINANCE_ITEM_CODE,
width:150,
name:'item_code'
})
);
}

this.fs.end();
this.fs.render('addItemForm');

var layout = this.dialog.getLayout();
layout.beginUpdate();
layout.add('center',new Ext.ContentPanel('addItemForm'));
layout.endUpdate();
this.dialog.show();
}


I have a button use this function ,but when I run it ,the Dialog window can not be draggable,and the 'minize',and the 'close' button is disabled,and also just only I click the fieldLabel,the cursor appear,but when I click the textfield,the cursor doesn't appear,what's the problem?
thank you!!!

dhanek
17 Aug 2007, 5:34 AM
For draggable - put resizabe : true,

height: 330,
width: 750,
minHeight: 100,
minWidth: 150,
modal: true,
proxyDrag: true,
resizable:false,
shadow: true,
center: {
//autoScroll:true,
alwaysShowTabs: false

dhanek
17 Aug 2007, 5:35 AM
Try this, In my example i put resizable:false but try with true.

iolerp
21 Aug 2007, 4:17 AM
it doesn't work...
other way?