-
23 Oct 2006 10:28 AM #1
ContentPanel & window resize / splitter resize
ContentPanel & window resize / splitter resize
I've appended 3 grids inside a ContentPanel using yui-grids css
[grid1 (33%)] [grid2 (33%) ] [ grid3 (33%) ]
I need to listen for window-resize / splitter resize events and manually autoSize() the grids within the ContentPanel.
how I do?
-
23 Oct 2006 2:11 PM #2
What do you mean autoSize()? Are you talking about yui-ext grid component or yui grids.css? You mention grids.css but autoSize() is part of the grid component so I am confused.

-
23 Oct 2006 3:22 PM #3
confusion
confusion
>What do you mean autoSize()?
I mean ext.grid.Grid::autoSize()
>You mention grids.css but autoSize() is part of the grid component so I am confused.
I mean I've got 3 ext.grid.Grid inside some YAHOO grid.css (damn that's confusing).
I'm using the teh class yui-gb to space 3 grids onscreen at screen widths of 1/3, 1/3, 1/3.
Code:[div id="MusicBrowser"] [div class="yui-gb"] [div class="yui-u first"] [div id="grid1" class="GenreList box datagrid"] [/div] [div class="yui-u"] [div id="grid2" class="ArtistList box datagrid"] [/div] [div class="yui-u"] [div id="grid3" class="box datagrid AlbumList"] [/div] [/div] [/div]
I would prefer to put each grid into their own YAHOO.ext.GridPanel, but I need each grid to occupy 33% of the screen, so I put all 3 ext.grid.Grid into a ContentPanel.Code:var browser = new YAHOO.ext.ContentPanel('MusicBrowser'); this.innerLayout.add('north', browser);
when the browser or a split-bar gets resized, I need to be notified so I can manually call autoSize() on each ext.grid.Grid.
not sure if made that any more clear or just made it muddier.
-
23 Oct 2006 7:11 PM #4
When the content panel is resized, the layout calls setSize(width, height) on the panel. GridPanel takes this and updates the container size and then calls autoSize(). You will want to just call autoSize().
Code:var cp = new YAHOO.ext.ContentPanel(...); cp.setSize = function(width, height){ grid1.autoSize(); grid2.autoSize(); grid3.autoSize(); }
-
23 Oct 2006 7:51 PM #5
>When the content panel is resized, the layout calls setSize(width, height)
yup, discovered that.
>GridPanel takes this and updates the container size and then calls autoSize().
saw this too.
beautiful. that hadn't occured to me. exactly what I needed. I was thinking of extending ContentPanel or something.Code:var cp = new YAHOO.ext.ContentPanel(...); cp.setSize = function(width, height){ grid1.autoSize(); grid2.autoSize(); grid3.autoSize();
merci beaucoup, monsieur Jacques.
a la prochain....
Similar Threads
-
How can I tell a grid to resize itself?
By davidascher in forum Ext 1.x: Help & DiscussionReplies: 13Last Post: 2 Jun 2008, 4:49 PM -
Resize menubar
By Amita in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 14 Mar 2007, 9:31 AM -
Need Help With BorderLayout Resize
By dangerzone in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 14 Feb 2007, 1:54 PM -
BorderLayout resize
By barrygently in forum Ext 1.x: BugsReplies: 0Last Post: 28 Nov 2006, 5:08 PM -
[OPEN] IE Resize problems
By jay@moduscreate.com in forum Ext 1.x: BugsReplies: 1Last Post: 26 Nov 2006, 3:13 PM


Reply With Quote