我有一个包含一些组件(如文本框和按钮)的工具栏,我想在其他组件之前动态添加一个组件(例如文本框)。
我尝试了tbBar.add(myComponent);
,但没有成功。
有什么建议吗?
作为额外的信息,您可以使用“Ext.container.AbstractContainer.container.items.indexOf”来获取容器中特定项的索引。
var index = container.items.indexOf(component);
container.insert(index, newComponent);
SimpleProjectDropdown
不存在或不正确。请展示SimpleProjectDropdown
的定义。其中应该有类似于alias: 'widget.'
的内容。 - Stefan Gehrig