5 Replies Latest reply on Apr 17, 2010 10:11 AM by David_F57

    3 columned list

    iamcootis Level 1

      I have a list with a fixed area that whose dataProvider is a ArrayCollection of one-word strings. My client wants the data to appear in 3 rows, fitting all words into the area instead of using a scroll bar.

       

      Any ideas on the best way to accomplish this? I've thought about taking the first 3 words and putting them in an HBOX, but that doesn't sound like the best solution to me.

        • 1. Re: 3 columned list
          David_F57 Level 5

          Hi,

           

          hi you talk about rows and columns, do you want a tiled list ?, do you want snaked text or left to right

           

          snake

          1 4 7

          2 5 8

          3 6 9

           

          left to right

           

          1 2 3

          4 5 6

          7 8 9

           

          it is easier to help one the problem is explained better or a sample of what you are trying to do is given.

           

          David.

          • 2. Re: 3 columned list
            iamcootis-nQaZl5

            I'm not sure if I want a tiledList. I have never used one, I want the text to be snaked. Will a tiledlist do this for me?

            • 3. Re: 3 columned list
              David_F57 Level 5

              hi,

               

              Not sure if you are using flexbuilder or flashbuilder, the following would do what you want in flashbuilder it uses a tiled list with data by column (snaking)

               

              <s:List id="list"

              itemRenderer="spark.skins.spark.DefaultComplexItemRenderer"

              horizontalCenter="0"

              verticalCenter="0">

              <s:layout>

              <s:TileLayout requestedColumnCount="3" requestedRowCount="3"

                horizontalGap="2" verticalGap="2" orientation="columns"

              horizontalAlign="center" />

              </s:layout>

              <s:dataProvider>

              <s:ArrayList>

              <s:Label text="first"/>

              <s:Label text="second"/>

              <s:Label text="third"/>

              <s:Label text="fourth"/>

              <s:Label text="fifth"/>

              <s:Label text="six"/>

              <s:Label text="seventh"/>

              <s:Label text="eigth"/>

              <s:Label text="nineth"/>

              </s:ArrayList>

              </s:dataProvider>

              </s:List>

              • 4. Re: 3 columned list
                iamcootis-nQaZl5 Level 1

                Hey Thanks, that's not the exact syntax for Flexbuilder but it's enough for me to understand how to do it now.


                • 5. Re: 3 columned list
                  David_F57 Level 5

                  flex 3 syntax

                   

                  <?xml version="1.0" encoding="utf-8"?>

                  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">

                  <mx:Script>

                  <![CDATA[

                  import mx.collections.ArrayCollection;

                  [Bindable] private var arr:ArrayCollection = new ArrayCollection(["1","2","3","4","5","6","7","8","9"]);

                  ]]>

                  </mx:Script>

                   

                  <mx:TileList x="249" y="131" direction="vertical" columnCount="3" rowCount="3" dataProvider="{arr}"></mx:TileList>

                   

                  </mx:Application>