-
28 Jun 2007 2:14 AM #1
Useful trick: multiple toolbars in contentPanel!
Useful trick: multiple toolbars in contentPanel!
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):
You can attach any number of toolbars, following this pattern.PHP Code: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"
});
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.
"It is better to be young, pretty and rich instead old, ugly and poor."
(c) Alan Ford.
-
9 Jul 2007 8:30 AM #2
-
10 Jul 2007 2:22 AM #3
-
10 Jul 2007 2:39 AM #4
You're welcome
"It is better to be young, pretty and rich instead old, ugly and poor."
(c) Alan Ford.
-
17 Jul 2007 8:23 AM #5
Request: Why not add '--' or '\n' or 'hr' as a text shortcut for creating a horizontal divider like '-' for Separator?
-
17 Jul 2007 9:29 AM #6
nice little trick.... does it work with gridPanels and treePanels as well??..... what abt nested layouts???
-
18 Jul 2007 7:42 AM #7


Reply With Quote




