PDA

View Full Version : Carousel question (or how can I mimic the NPR app)



gwthompson
20 Jul 2010, 6:30 AM
Hi,

I'm trying to determine the best way to do something and I'm assuming I need to use a carousel of some form. What I want to have is a horizontally scrolling area at the bottom of the page taking about 1/5th of the vertical area and the rest of the space will be used to display video, text, pictures, etc. from whichever item has been selected in the carousel. If you have ever seen the NPR iPad app when you select an article to read this is the effect I'm trying to achieve.

Hopefully this makes sense.

Any and all help would be greatly appreciated.

Thanks,
gt

evant
20 Jul 2010, 6:38 AM
Unless I'm missing something, this is pretty trivial to do:



Ext.setup({
icon: 'icon.png',
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
glossOnIcon: false,
onReady: function() {

var data = [];
for(var i = 0; i < 100; ++i){
data.push('Line ' + i);
}

new Ext.Panel({
fullscreen: true,
layout: {
type: 'vbox',
align: 'stretch'
},
items: [{
flex: 4,
html: 'Main content here, you could also nest other panels',
style: 'border: 1px solid red;'
},{
flex: 1,
scroll: 'vertical',
html: data.join('<br />')
}]
});
}
});