1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    17
    Vote Rating
    0
    Answers
    1
    XPEHBAM is on a distinguished road

      0  

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

    Unanswered: 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 - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,012
    Vote Rating
    212
    Answers
    477
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


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

Thread Participants: 1

Tags for this Thread