Results 1 to 5 of 5

Thread: Vbox problem with vertical scrolls

  1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
      0  

    Question Vbox problem with vertical scrolls

    Hello,

    I have a panel with vbox layout, when i resize my window the vertical scroll doesn't appear.

    Here is my code:
    PHP Code:
    function getContentPanel() {
        var 
    contentPanel = new Ext.Panel( {
            
    region 'center',
            
    layout: {
                
    type'vbox',
                
    align'center'
            
    },
            
    autoScrolltrue,
            
    items : [ new Ext.Panel( {
                    
    layout:'column',
                    
    autoScrolltrue,
                    
    width1102,
                    
    heigth1102,
                    
    title '<center><fmt:message key="UserAddDeleteManage" /></center>',
                    
    items : [getNewUserForm(),getJsonGrid()]
                })
            ]
        });
        return 
    contentPanel;

    PHP Code:
    function setLayout() {
        
    viewport = new Ext.Viewport( {
            
    layout 'border',
            
    items : [ getHeaderPanel(), getContentPanel() ,getFooterPanel()]
        });

    I use vbox this because I need to center the content panel. Any sugestion would be really great.

    Thanks.

    --
    Mehmet

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    VBox and HBox layout don't support scrolling.

    You will have to reconfigure your layout so the container inside the box layout does the scrolling.

  3. #3
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
      0  

    Default

    May I ask you how?

    --
    Mehmet

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    Try:
    Code:
    function getContentPanel() {
        var contentPanel = new Ext.Panel({
            region : 'center',
            layout: {
                type: 'vbox',
                align: 'center'
            },
            items : [{
                xtype: 'container',
                width: 1102,
                flex: 1,
                autoScroll: true,
                layout: 'anchor',
                items: {
                    anchor: '0',
                    layout:'column',
                    heigth: 1102,
                    title : '<center><fmt:message key="UserAddDeleteManage" /></center>',
                    items : [getNewUserForm(),getJsonGrid()]
                }
            }]
        });
        return contentPanel;
    }
    Disclaimer: Completely untested code!

  5. #5
    Sencha User
    Join Date
    Aug 2010
    Posts
    177
    Vote Rating
    0
      0  

    Default

    Copy paste worked thanks alot Condor.

    --
    Mehmet

Similar Threads

  1. No vertical scrollbar with vbox layout
    By mjdslob in forum Ext 3.x: Help & Discussion
    Replies: 10
    Last Post: 3 May 2016, 7:08 AM
  2. Problem in TreeTable Vertical Scrollbar
    By livinglegends in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 22 Jun 2009, 8:34 PM
  3. Problem in TreeTable Vertical Scrollbar
    By livinglegends in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 15 Jun 2009, 5:37 AM
  4. Grids and Vertical/Horizonal Scrolls
    By jabbey in forum Community Discussion
    Replies: 1
    Last Post: 17 Dec 2008, 2:00 AM
  5. Slight problem using TabPanel and scrolls
    By santiago.alvarez in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 20 Dec 2007, 11:15 AM

Tags for this Thread

Posting Permissions

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