Results 1 to 2 of 2

Thread: Horizontal Scroll Bar appearing even though only the vertical one should be.

  1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    17
    Answers
    1
    Vote Rating
    0
      0  

    Default Horizontal Scroll Bar appearing even though only the vertical one should be.

    Hello, I have a border layout panel like such:

    extEX.jpg

    The red center region panel has multiple elements in it and should scroll vertically when needed. Currently, my code looks something like this:

    Code:
    items: [{
                region: 'north',
                //header
            }, {
                autoScroll: true,
                region: 'center',
                xtype: 'container',
                layout: {
                    type:'vbox',
                    align: 'center'
                },
                items: this.createItems()
            },{
                 region: 'south'
                 //footer
    
            }];
    
        createItems: function() {
            return [{
                xtype: 'container',
                items: [
                    this.createPanel1(),
                    this.createPanel2(),
                    this.createPanel3()
                ],
                layout: {
                    type:'vbox',
                    align: 'stretch'
                },
                width: 600
            }];
        }
    It works well now because when the page shrinks horizontally, the red panel is still centered and only the whitespace on the sides shrinks. However, when the height is not enough to fit the whole thing, a horizontal scroll bar appears as well. What would really be nice is an overflowX type of config for containers.

    Is there a way to stop this behavior or implement it another way so that it doesnt?

  2. #2
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Answers
    501
    Vote Rating
    257
      0  

    Default

    You might look at overflowY instead of autoScroll: true.
    http://docs.sencha.com/extjs/4.2.0/#...-cfg-overflowY

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
  •