如何在可滚动的配置中使面板不可滚动

时间:2013-02-05 06:39:55

标签: sencha-touch sencha-touch-2

当我将配置设置为可滚动时,整个面板会滚动。但是,在可滚动面板的items中,我想锁定其中一个panelscroll

怎么做?

config: {
    scrollable: true,
    items: [{
        xtype: 'panel',
        layout: {
            //type: 'vbox',
            //align: 'start',
            pack: 'fit'
        },
        items: [{
            //want to lock this panel
            xtype: 'panel',
            id: 'name',
            flex: 3,
            scrollable: false,
            html: '<b>Hello</b><br/>' +
                'My name is rohan'
        }, {
            xtype: 'panel',
            scrollable: true,
            layout: 'fit',
            flex: 5,
            listeners: {
                initialize: function(thisObj, eOpts) {
                    var parentObj = Ext.getCmp('id')
                    var service = parentObj.config.record.get('service')
                    var serviceArr = services.length;
                    for (i = 0; i < serviceArr; i++) {
                        thisObj.insert(i, {
                            xtype: 'panel',
                            cls: 'service',
                            layout: 'fit',
                            items: [{
                                html: '<br/>' + servicesOffered[i].service,
                                cls: 'serviceTitle',
                            }, {
                                xtype: 'list',
                                cls: 'namelist',
                                scrollable: 'false',
                                itemTpl: '{name} <span> {tel} - {mobile}</span>',
                                data: servicesOffered[i].namedetails,
                                height: 332,
                            }]
                        });
                    }
                }
            }
        }]
    }]
}

现在整个面板都在滚动。我想锁定最顶层的面板。

0 个答案:

没有答案