Results 1 to 3 of 3

Thread: vBox layout 'stretch' option not work in border center region

  1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    6

    Question vBox layout 'stretch' option not work in border center region

    PHP Code:
    Ext.BLANK_IMAGE_URL '/extjs/resources/images/default/s.gif';


        
    Ext.onReady(function(){    
            
            var 
    view=new Ext.Viewport({
            
    layout'border',
            
    renderToExt.getBody(),
            
    items:
            [
                {
    xtype'panel'title:'left panel'region:'west'width:300},
                {
    xtype'panel'title:'center region'region:'center'layout:'vbox'align'stretch'items:[
                    {
    xtype:'panel'title:'first panel'flex:1},
                    {
    xtype:'panel'title:'second panel',flex:2}
                ]}
                
            ]
        })    

    }); 
    I cannot understand why the 'first panel' and 'second panel' do not extend on all width of the center region. What I do incorrectly?

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    align is a config of the layout

    It is not a config of Panel.

    Code:
    layout: {
        type: 'vbox',
        align: 'stretch'
    }

  3. #3
    Sencha User
    Join Date
    Oct 2009
    Posts
    6

    Default

    Thank you for your answer. My problem is solved.

Similar Threads

  1. border layout, center region hides west region
    By epalm in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 1 Apr 2010, 8:43 AM
  2. Border layout, load in region center
    By Stephan123 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 24 Aug 2009, 7:58 AM
  3. How to resize the center region in border layout?
    By izddlp in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 24 Nov 2008, 11:31 PM
  4. No center region defined in border layout
    By bubbless in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 4 Jun 2008, 7:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •