PDA

View Full Version : How to disable toolbar scroll?



aguerra10
21 Nov 2011, 12:59 PM
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.
(http://docs.sencha.com/touch/2-0/#!/api/Ext.Container-cfg-scrollable)

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


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'}
]
}

stan229
21 Nov 2011, 1:06 PM
If you only have two items there, you do not need a vbox layout. I'm also not sure what the animation is for.

aguerra10
21 Nov 2011, 2:33 PM
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 :D

Thank you guys!!

rdougan
21 Nov 2011, 11:32 PM
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.

aguerra10
22 Nov 2011, 4:29 AM
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. :)