1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
    mcadirci is on a distinguished road

      0  

    Question How to set align of a panel

    How to set align of a panel


    Hello,

    How can I set the align of a panel, that is in a border layout viewport, to center?

    I have tried vbox layout with align center but when I resize the window vertical scroll bar is missing.

    Thanks.

    --
    Mehmet

  2. #2
    Sencha User laurentParis's Avatar
    Join Date
    Aug 2010
    Location
    paris
    Posts
    246
    Vote Rating
    2
    laurentParis is on a distinguished road

      0  

    Default


    your center panel must have fix width or not ?

  3. #3
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
    mcadirci is on a distinguished road

      0  

    Default


    It doesn't matter for me, I have fixed width atm.
    Here is my code:

    function setLayout() {
    viewport = new Ext.Viewport( {
    id: 'viewPort',
    layout : 'border',
    autoScroll: true,
    items : [ getHeaderPanel(), getContentPanel() ,getFooterPanel()]
    });
    }
    function getContentPanel() {
    var contentPanel = new Ext.Panel( {
    region : 'center',
    layout: {
    type: 'vbox',
    align: 'center'
    },
    autoScroll: true,
    items : [ new Ext.Panel( {
    layout:'column',
    autoScroll: true,
    width: 1102,
    title : '<center><fmt:message key="UserAddDeleteManage" /></center>',
    items : [getNewUserForm(),getJsonGrid()]
    })
    ]
    });
    return contentPanel;
    }

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    In the examples/ux directory there is also a CenterLayout.

  5. #5
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
    mcadirci is on a distinguished road

      0  

    Default


    I think this layout not working in borderLayout.

    Any other suggestions would be great.

Similar Threads

  1. Replies: 1
    Last Post: 20 Nov 2009, 2:22 AM
  2. How to set the tabPanel title center align
    By cprabha in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 Mar 2009, 2:29 AM
  3. How to set align of grid.RowNumberer
    By redlz2500 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 29 Jan 2008, 5:06 AM
  4. how to set align in comboBox
    By Supersuper in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 10 Jul 2007, 9:01 AM

Thread Participants: 2