1. #1
    Banned
    Join Date
    Nov 2007
    Location
    Germany
    Posts
    101
    Vote Rating
    0
    junkzilla is on a distinguished road

      0  

    Default autoScroll woes

    autoScroll woes


    I'm loading my page and attempting to update the panel to be autoScroll, but I'm failing. Any
    idea how to make autoScroll work after it's been loading?

    This is my latest attempt, but even this fails.

    NOTE: the page has already been loaded, and the panel in the original load did not have
    autoScroll turned on. If it was turned on with the original load, then autoScroll works fine,
    but I'm attempting to turn it on after.

    PHP Code:

    $('panel').update('');
    var 
    pan = new Ext.Panel({
        
    title'AutoScroll please!',
        
    renderTo'panel',
        
    autoScrolltrue
    }).show();

    pan.load({url'/index.html' });

    pan.autoScroll// => true    but still no beef :/ 

  2. #2
    Banned
    Join Date
    Nov 2007
    Location
    Germany
    Posts
    101
    Vote Rating
    0
    junkzilla is on a distinguished road

      0  

    Default


    Here's another issue. How can I get the scrollbars to come on if I resize my window?


    PHP Code:

    Ext
    .getBody().update('<div id="test" style="width: 500;  height: 300"></div>');
    Ext.get('test').update('');
    var 
    aaa = new Ext.Panel({
        
    title'Cowboy',
    id'foo',
    // height: 500, // if this is set, autoscroll works 
        
    renderTo'test',
    autoScrolltrue,
    }).
    show();

    aaa.load({url'/' });

    //Ext.get('test').applyStyles('overflow:auto'); 

  3. #3
    Ext User
    Join Date
    Apr 2008
    Posts
    3
    Vote Rating
    0
    eydaimon is on a distinguished road

      0  

    Default


    I'm seeing the same problem here.

    PHP Code:

    Ext.getBody();
    b.update('<div id="test"></div>');
    panel = new Ext.Panel({
    title"Panel",
    autoScrolltrue,
    renderTo'test',
    html"foo"
    });
    panel.load({url'/'}); 

    Only if "height" is explicitly defined do scollbars show up. Anyone?

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,000
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    No, you need to either
    a) Give it a height
    b) Put it in a layout that manages the height.

    If you don't give it a height, how does it know when to draw scrollbars?

  5. #5
    Banned
    Join Date
    Nov 2007
    Location
    Germany
    Posts
    101
    Vote Rating
    0
    junkzilla is on a distinguished road

      0  

    Default


    Quote Originally Posted by evant View Post
    No, you need to either
    a) Give it a height
    b) Put it in a layout that manages the height.

    If you don't give it a height, how does it know when to draw scrollbars?

    b) sounds like the way to go, because using a) will make things look weird.

    I've been using layout 'fit', however, it still does not autoscroll if the document is larger.

    What layout do you propose that manages the height?

    One thing i thought of doing was put event listeners to check for resize and update height accordingly. i.e. I can check the height for the west panel, and resize the center panel by doing...

    PHP Code:

    Ext
    .getCmp('centerPanel').setHeightExt.getCmp('westPanel').getInnerHeight() + Ext.getCmp('westPanel').getFrameHeight() ); 

    but that seems akward.

    http://extjs.com/deploy/dev/examples...t/complex.html

    seems to do what i'm looking for, but I guess I just haven't gotten to understand why it works there, and not for me. Thanks for looking.

Thread Participants: 2