PDA

View Full Version : Vertical Carousel



simon.betton
23 Jun 2010, 6:28 PM
Does anyone know how to make the carousel scroll vertically? I am using the code from the example package.


Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {
// Create a Carousel of Items
var carousel1 = new Ext.Carousel({
defaults: { cls: 'card' },
items: [{
html: '<h1>Carousel</h1><p>Navigate the two carousels on this page by swiping left/right or clicking on one side of the circle indicators below.</p>'
}, {
title: 'Tab 2',
html: '2'
}, {
title: 'Tab 3',
html: '3'
}]
});

var carousel2 = new Ext.Carousel({
ui: 'light',
defaults: { cls: 'card' },
items: [{
title: 'Tab 1',
html: '<h1>ui="light"</h1>'
}, {
title: 'Tab 2',
html: '2'
}, {
title: 'Tab 3',
html: '3'
}]
});

new Ext.Panel({
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch'
},
defaults: {
flex: 1
},
items: [carousel1, carousel2]
});
}
});


Cheers,
Simon

TommyMaintz
24 Jun 2010, 11:10 AM
Try setting scroll: 'vertical' on the items inside the Carousel. Unfortunately we dont support a vertical Carousel yet, but scrolling the individual items inside the Carousel should work.