PDA

View Full Version : Toolbar on GridPanels



schmidetzki
6 Nov 2006, 2:38 PM
I can add a toolbar to a ContentPanel like this:


innerWestLayout.add('center', new YAHOO.ext.ContentPanel('siteexplorer', {title: 'Siteexplorer', fitToFrame:true, toolbar: tb, resizeEl:'siteexplorer-body'}));
This works fine.
It does however not work on a gridPanel:

innerWestLayout.add('south', new YAHOO.ext.GridPanel(grid, {title:'Versions', toolbar:tb, resizeEl:'contentlist-grid'}));
The toolbar never appears.

jack.slocum
6 Nov 2006, 5:01 PM
Try this:

var gp = innerWestLayout.add('south', new YAHOO.ext.GridPanel(grid, {title:'Versions', toolbar:tb}));
gp.getEl().appendChild(gp.toolbar.el);

(Requires latest build)

Let me know if it works. If it does I will add it to the main codebase.

FYI: resizeEl is ignored on a GridPanel.

schmidetzki
14 Nov 2006, 9:19 AM
It works now.
Txs