violinista
28 Jun 2007, 2:14 AM
I made a little trick, in need to put multiple toolbars in one content panel, maybe it'll be useful for someone(for me is much useful):
var tb = new Ext.Toolbar(panel.el);
tb.add("First row:",{
text:"Button 1"
},'-',{
text:"Button 2"
});
var tb2container=Ext.DomHelper.append(tb.el,{tag:'div',id:Ext.id()},true);
var tb2 = new Ext.Toolbar(tb2container);
tb2.add("Second row:",{
text:"Button 3"
},'-',{
text:"button 4"
});
You can attach any number of toolbars, following this pattern.
A screenshot is also attached.
If someone has other (better) way to to this, please post here and let me know.
Note: Ext.DomHelper.append(...) appends a <div /> tag. I suppose this is not a problem, since this div isn't closed-I use it only as separator. :D
var tb = new Ext.Toolbar(panel.el);
tb.add("First row:",{
text:"Button 1"
},'-',{
text:"Button 2"
});
var tb2container=Ext.DomHelper.append(tb.el,{tag:'div',id:Ext.id()},true);
var tb2 = new Ext.Toolbar(tb2container);
tb2.add("Second row:",{
text:"Button 3"
},'-',{
text:"button 4"
});
You can attach any number of toolbars, following this pattern.
A screenshot is also attached.
If someone has other (better) way to to this, please post here and let me know.
Note: Ext.DomHelper.append(...) appends a <div /> tag. I suppose this is not a problem, since this div isn't closed-I use it only as separator. :D