1. #1
    Ext User
    Join Date
    Jun 2010
    Posts
    63
    Vote Rating
    0
    orangechicken is on a distinguished road

      0  

    Default 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

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    8
    TommyMaintz will become famous soon enough

      0  

    Default


    Here is an example of how to do that.

    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
    });
    Note that autoHeight is not needed and it is scroll: 'vertical' instead of vertical: 'scroll'.

    I am interested to hear from you if a vertical scroller inside a horizontal carousel works though, so let us know.

Similar Threads

  1. loading content longer than viewport/condor's page scroll method
    By smokeman in forum Community Discussion
    Replies: 13
    Last Post: 21 Nov 2011, 1:31 PM
  2. [OPEN] [FIXED-110] Carousel indicator breaks down after changing carousel content.
    By Mphasize in forum Sencha Touch 1.x: Bugs
    Replies: 6
    Last Post: 1 Jul 2010, 11:41 AM
  3. How to: Vertically Scrolling Carousel
    By simon.betton in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 24 Jun 2010, 10:28 AM
  4. How to make EditorGridPanel scroll vertically - help
    By rahul1976 in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 21 May 2009, 9:52 PM
  5. Noob Question -- How do I use the exiting DIV content as panel content?
    By garretschweitzer in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 26 Mar 2009, 8:49 AM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar