I have a ToolBar with some components (TextFields and Buttons) and I would like to dynamically add a component (TextField, for example) before the other components.
I tried tbBar.add(myComponent);
without success.
Any idea?
I have a ToolBar with some components (TextFields and Buttons) and I would like to dynamically add a component (TextField, for example) before the other components.
I tried tbBar.add(myComponent);
without success.
Any idea?
You can use Ext.container.AbstractContainer.insert
:
tbBar.insert(0, myComponent);
SimpleProjectDropdown
does not exist or is incorrect. Please show the definition of SimpleProjectDropdown
. There should be something like alias: 'widget.'
in there. –
Primaveria alias
for your component matches widget.SimpleProjectDropdown
? And aliases should be written in lower-case but I'm not sure if this is enforced when instantiating a component. –
Primaveria As an additional information, you can use "Ext.container.AbstractContainer.container.items.indexOf" to get an index of a specific item in your container.
var index = container.items.indexOf(component);
container.insert(index, newComponent);
© 2022 - 2024 — McMap. All rights reserved.