Adding an item to an existent window
Posted
by farhad
on Stack Overflow
See other posts from Stack Overflow
or by farhad
Published on 2010-05-23T23:09:29Z
Indexed on
2010/05/24
1:31 UTC
Read the original article
Hit count: 454
extjs
Hello! How can i add an item to an existent window? I tried win.add() but it does not seem to work. Why? This is my piece of code:
function combo_service(winTitle,desc,input_param) {
/* parametri */
param=input_param.split(","); /* della forma: param[0]="doc1:text", quindi da splittare di nuovo */
/* cosi' non la creo più volte */
win;
if (!win)
var win = new Ext.Window({
//title:Ext.get('page-title').dom.innerHTML
renderTo:Ext.getBody()
,iconCls:'icon-bulb'
,width:420
,height:240
,title:winTitle
,border:false
,layout:'fit'
,items:[{
// form as the only item in window
xtype:'form'
,labelWidth:60
,html:desc
,frame:true
,items:[{
// textfield
fieldLabel:desc
,xtype:'textfield'
,anchor:'-18'
}]
}]
});
win.add({
// form as the only item in window
xtype:'form'
,labelWidth:60
,html:desc
,frame:true
,items:[{
// textfield
fieldLabel:desc
,xtype:'textfield'
,anchor:'-18'
}]});
win.show();
};
What's wrong with my code? Thank you very much.
© Stack Overflow or respective owner