开发者

Sencha touch vertical scroll content in a horizontal carousel

开发者 https://www.devze.com 2023-04-07 16:47 出处:网络
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 scro开发者_Go百科

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 scro开发者_Go百科ll 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?


try this:

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

and

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


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

});
}
});
0

精彩评论

暂无评论...
验证码 换一张
取 消