1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    61
    Vote Rating
    0
    aguerra10 is on a distinguished road

      0  

    Default How to disable toolbar scroll?

    How to disable toolbar scroll?


    Hi all,

    I am trying to disable scroll in a toolbar. I want to show a list under a toolbar and only want to make the list scrollable, however when I scroll the list, the toolbar is also scrolling.


    Does anybody know how to solve this? Some code here... Thanks!!!

    Code:
    layout: {
                  type: 'vbox',
                  animation: {
                    type: 'slide',
                    direction: 'left',
                    duration: 500,
                  }
            },
            
            items: [
                {
                    xtype: 'toolbar',
                    id: 'homeTopBar',
                    title: 'Home',
                    docked: 'top',
                },
                {
                    xtype: 'list',
                    id: 'homeScreen',
                    flex: 1,
                        
                    itemTpl: '{title}',
                    store: {
                        fields: ['title', 'url'],
                        data: [
                            {title: 'Constituents', url: 'ext-scheduler-2-0-upgrading-to-ext-js-4'},
                            {title: 'Developers', url: 'sencha-touch-2-what-to-expect'},
                            {title: 'Administrators', url: 'senchacon-2011-now-packed-with-more-goodness'},
                            {title: 'Guests', url: 'new-ext-js-4-documentation-center'}
                        ]
                    }


  2. #2
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Location
    NYC
    Posts
    112
    Vote Rating
    1
    stan229 is on a distinguished road

      0  

    Default


    If you only have two items there, you do not need a vbox layout. I'm also not sure what the animation is for.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    61
    Vote Rating
    0
    aguerra10 is on a distinguished road

      0  

    Default


    Quote Originally Posted by stan229 View Post
    If you only have two items there, you do not need a vbox layout. I'm also not sure what the animation is for.
    Yes, you're right Stan!! Thanks!! That was some bad copy/paste issue
    However, those problems are not related to the scroll one, so I am still hoping someone can help me

    Thank you guys!!

  4. #4
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    The only way the toolbar and list could scroll together in sync is if their container was scrollable. Hard to know without having all the code.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    61
    Vote Rating
    0
    aguerra10 is on a distinguished road

      0  

    Default


    Quote Originally Posted by rdougan View Post
    The only way the toolbar and list could scroll together in sync is if their container was scrollable. Hard to know without having all the code.
    Second time you've helped me solve a problem rdougan, thanks a lot!! You were right, I was using a tabPanel which was being config as scrollable.

Thread Participants: 2