1 Reply Latest reply on Sep 17, 2009 11:08 AM by Peter deHaan

    iPhone like lists - no visible scrollbar -

    Truce Level 1

      I'd like to create a list that can be scrolled via the actual list contents like iPhone apps.

       

      How should I go about setting this up in Catalyst and anything I should handle in FLASH Builder?


      Any thoughts or suggestions welcomed.

       

       

      Cheers,

      -Truce

        • 1. Re: iPhone like lists - no visible scrollbar -
          Peter deHaan Level 4

          Truce,

           

          You can disable the scrollbars on a Spark List control by setting the verticalScrollPolicy style on the List control's inner Scroller instance. You could do this using CSS:

           

          <?xml version="1.0" encoding="utf-8"?>
          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                          xmlns:s="library://ns.adobe.com/flex/spark">
              <fx:Style>
                  @namespace s "library://ns.adobe.com/flex/spark";
                  s|List #scroller {
                      verticalScrollPolicy: off;
                  }
              </fx:Style>
              <s:List id="list">
                  <s:layout>
                      <s:VerticalLayout gap="0"
                                        horizontalAlign="contentJustify"
                                        requestedRowCount="5" />
                  </s:layout>
                  <s:dataProvider>
                      <s:ArrayList>
                          <fx:Object label="One" />
                          <fx:Object label="Two" />
                          <fx:Object label="Three" />
                          <fx:Object label="Four" />
                          <fx:Object label="Five" />
                          <fx:Object label="Six" />
                          <fx:Object label="Seven" />
                          <fx:Object label="Eight" />
                          <fx:Object label="Nine" />
                          <fx:Object label="Ten" />
                      </s:ArrayList>
                  </s:dataProvider>
              </s:List>
          </s:Application>
          

           

          Or you could create a custom skin for the List control and modify the Scroller instance there (and then set the skinClass style to your custom skin).

           

          Peter