Animal
09-28-2006, 08:38 AM
Shouldn't this auto size the grid to the size of it's containing element?
For instance, I have a YAHOO.widget.Dialog containing a YAHOO.ext.TabPanel.
I'm hooking the window resize event:
YAHOO.widget.Overlay.windowResizeEvent.subscribe(function()
{
if (this.ownerDialog)
{
var contentArea = document.getElementById("content");
var cxy = YAHOO.util.Dom.getXY(contentArea);
this.ownerDialog.cfg.setProperty("height", Math.min(570, (YAHOO.util.Dom.getViewportHeight() - cxy[1])) + "px");
this.ownerDialog.cfg.setProperty("width", (contentArea.offsetWidth - 2) + "px");
}
if (this.grid)
{
this.grid.autoSize();
}
}, this, true);
The Dialog resizes fine, and the tab panel shrinks when I shrink the window. But the Grid which I've rendered into the bodyEl of the tab panel does not resize itself.
For instance, I have a YAHOO.widget.Dialog containing a YAHOO.ext.TabPanel.
I'm hooking the window resize event:
YAHOO.widget.Overlay.windowResizeEvent.subscribe(function()
{
if (this.ownerDialog)
{
var contentArea = document.getElementById("content");
var cxy = YAHOO.util.Dom.getXY(contentArea);
this.ownerDialog.cfg.setProperty("height", Math.min(570, (YAHOO.util.Dom.getViewportHeight() - cxy[1])) + "px");
this.ownerDialog.cfg.setProperty("width", (contentArea.offsetWidth - 2) + "px");
}
if (this.grid)
{
this.grid.autoSize();
}
}, this, true);
The Dialog resizes fine, and the tab panel shrinks when I shrink the window. But the Grid which I've rendered into the bodyEl of the tab panel does not resize itself.