-
30 Jun 2010 3:12 PM #1
Noob: How to get a long page of content inside a carousel to scroll vertically?
Noob: How to get a long page of content inside a carousel to scroll vertically?
Yes, this sounds like (and probably *is*) a newbie question, but I'll swallow my pride:
Given a panel full of images that's taller than the viewport, how do I get vertical scrolling to work? I bet this isn't even carousel related so the question could be generalized to this: How do I get the panel to size itself correctly so that I can view all its contents by scrolling vertically?
Code can be viewed at http://pastie.org/private/fhyen395twuxhozol4dahg
-
30 Jun 2010 5:31 PM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
Here is an example of how to do that.
Note that autoHeight is not needed and it is scroll: 'vertical' instead of vertical: 'scroll'.Code:// Add a page of content var images = [ 'images/image000.jpg', 'images/image001.png', 'images/image002.png', 'images/image003.jpg', 'images/image004.jpg', 'images/image005.jpg' ]; var str = images.map( function( path, index ){ return "<img src='" + path + "'/>"; }).join(''); var imagePanel = new Ext.Panel({ title: "Images", cls: 'images-container', html: str, scroll: 'vertical' }); // Create the carousel and add the panels var remote = new Ext.Carousel({ fullscreen: true, items: [imagePanel, dPadPanel, numberPadPanel], // I have a couple other panels in the carousel; removed for brevity indicator: false });
I am interested to hear from you if a vertical scroller inside a horizontal carousel works though, so let us know.
Similar Threads
-
loading content longer than viewport/condor's page scroll method
By smokeman in forum Community DiscussionReplies: 13Last Post: 21 Nov 2011, 1:31 PM -
[OPEN] [FIXED-110] Carousel indicator breaks down after changing carousel content.
By Mphasize in forum Sencha Touch 1.x: BugsReplies: 6Last Post: 1 Jul 2010, 11:41 AM -
How to: Vertically Scrolling Carousel
By simon.betton in forum Sencha Touch 1.x: DiscussionReplies: 1Last Post: 24 Jun 2010, 10:28 AM -
How to make EditorGridPanel scroll vertically - help
By rahul1976 in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 21 May 2009, 9:52 PM -
Noob Question -- How do I use the exiting DIV content as panel content?
By garretschweitzer in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 26 Mar 2009, 8:49 AM


Reply With Quote
