关于tabpanel一个问题,帮忙解决一下
a301107699
2008-09-18
Ext.onReady(function(){
var i=0; var tab=new Ext.TabPanel({ renderTo:"hello", width:'100%', height:500, enableTabScroll:true, activeTab:0, bbar:[{text:"添加", handler:function(){ tab.add({title:'asdfd',layout:'fit',items:[{xtype:'fieldset',title:'sdfsa',autoHeight:true,items:[{layout:'column',items:[{columnWidth:0.5,layout:'form',border:false,items:[{xtype:'textfield'}]}]}]}]}); }} ], items:[{html:'nihao',title:'first'} ] }); }); 为什么上面代码在ie中点击添加新的tab时,新的tab中无法显示textfield |
|
jerrycong
2008-09-18
Ext.onReady(function(){
var i=0; var tab=new Ext.TabPanel({ renderTo:"hello", width:'100%', height:500, EnableTabScroll:true, activeTab:0, bbar:[{ text:"添加", handler:function(){ tab.add({ title:'asdfd', layout:'fit', items:[{ xtype:'fieldset', title:'sdfsa', autoHeight:true, items:[{ layout:'column', items:[{ columnWidth:0.5, layout:'form', border:false, items:[{ xtype:'textfield', fieldLabel:'Name' }] }] }] }] //显示新tab }).show(); //由于textfield是延迟加载,需要重新对其渲染 tab.doLayout(); } }], items:[{ html:'nihao',title:'first' }] }); }); |