0
我想创建这样ExtJS的可更换项目
Ext.onReady(function() {
Ext.QuickTips.init();
Ext.create('Ext.Viewport', {
layout: 'fit',
id: 'cmpWithReplacebleItems'
});
Ext.getCmp('cmpWithReplacebleItems').items = [new SomeComponent()];
});
SomeComponent
SomeComponent = Ext.extend(Ext.Viewport, {
layout: 'fit',
items: [{
xtype: 'panel',
html: 'test',
title: 'My Panel'
}]
});
的代码的东西你可以看到,我想 'cmpWithReplacebleItems' 项目是replaceble。但是,当我尝试此代码时,我调整大小时出现一些错误...
问题是..什么是正确的方法来做到这一点?
tnx,我实际上是在一分钟前通过我自己找到了这个:D但真的tnx对你回答.. – 2011-03-12 22:13:15