Sencha touch vertical scroll content in a horizontal carousel

一笑奈何 提交于 2019-12-21 21:36:39

问题


I want to have a horizontal carousel where the content of each panel is able to scroll vertically. Currently the content is chopped off at the bottom of the screen and I am unable to scroll down the content. I use this code for the carousel:

Pages.Portfolio = new Ext.Carousel({
title: 'Portfolio'
});

And add new items to it by:

Pages.Portfolio.add(
    new Ext.Panel({
        html: response.responseText                    
    })
);

Layout to fixed does not seem to solve the problem.

Anyone an idea how to solve this problem?


回答1:


try this:

Pages.Portfolio = new Ext.Carousel({
  title: 'Portfolio',
  fullscreen:true
});

and

Pages.Portfolio.add(
    new Ext.Panel({
        html: response.responseText,
        scroll:'vertical'       
    })
);



回答2:


try it!

              Ext.application({
name:'ehmm',
launch:function(){
Ext.create('Ext.Carousel', {
    fullscreen: true,

defaults: {
    styleHtmlContent: true
},
scroll:'vertical',
items: [
    {
        html : 'Item 1',
        style: 'background-color: #5E99CC'
    },
    {
        html : 'Item 2',
        style: 'background-color: #759E60'
    },
    {
        html : 'Item 3',
    style:'background-color:red;'
    },
{
    html:'contohnya',
    style:'background-color:pink;'
},
]

});
}
});


来源:https://stackoverflow.com/questions/7530770/sencha-touch-vertical-scroll-content-in-a-horizontal-carousel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!