PDA

View Full Version : Adding a Toolbar to a Panel from Plugin doesn't show up.



CrazyEnigma
10 Jun 2010, 9:10 PM
If I create a Toolbar in the panel, the toolbars will be appended to the toolbar, no problems, but if I don't specify a toolbar initially in the config, it does not render.

I tried using doLayout, but thought that this would work.



init: function(obj) {
// Append Tools to Map Toolbar...
var toolbar = obj.getTopToolbar() || new Ext.Toolbar();
toolbar.add({
text: "Test Button",
handler: function(b, e) {
// Do something...
}
});

obj.doLayout(); // May not be the right call...

Ext.apply(obj, {
// More configs and functions...
});
} // end of function init



I'm missing a crucial key step. What do I need to do to get this to work?