1. #1
    Ext JS Premium Member christocracy's Avatar
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    381
    Vote Rating
    0
    christocracy is on a distinguished road

      0  

    Default 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?

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    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.

  3. #3
    Ext JS Premium Member christocracy's Avatar
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    381
    Vote Rating
    0
    christocracy is on a distinguished road

      0  

    Default 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]
    Code:
    var browser = new YAHOO.ext.ContentPanel('MusicBrowser');
    this.innerLayout.add('north', browser);
    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.

    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.

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    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();
    }

  5. #5
    Ext JS Premium Member christocracy's Avatar
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    381
    Vote Rating
    0
    christocracy is on a distinguished road

      0  

    Default


    >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.

    Code:
    var cp = new YAHOO.ext.ContentPanel(...); 
    cp.setSize = function(width, height){
    grid1.autoSize();
    grid2.autoSize();
    grid3.autoSize();
    beautiful. that hadn't occured to me. exactly what I needed. I was thinking of extending ContentPanel or something.
    merci beaucoup, monsieur Jacques.
    a la prochain....

Similar Threads

  1. How can I tell a grid to resize itself?
    By davidascher in forum Ext 1.x: Help & Discussion
    Replies: 13
    Last Post: 2 Jun 2008, 4:49 PM
  2. Resize menubar
    By Amita in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 14 Mar 2007, 9:31 AM
  3. Need Help With BorderLayout Resize
    By dangerzone in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 14 Feb 2007, 1:54 PM
  4. BorderLayout resize
    By barrygently in forum Ext 1.x: Bugs
    Replies: 0
    Last Post: 28 Nov 2006, 5:08 PM
  5. [OPEN] IE Resize problems
    By jay@moduscreate.com in forum Ext 1.x: Bugs
    Replies: 1
    Last Post: 26 Nov 2006, 3:13 PM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi