4 Replies Latest reply on Jun 16, 2006 5:08 PM by Newsgroup_User

    Newbie layout question.

    Level 7
      I have an arrayCollection of objects that can have either 28, 35 or 42
      items. I want to layout them out in the manner of a calendar. One
      object per box, seven boxes per row, 4, 5 or 6 rows depending.

      My first instinct is a grid combined with some kind of repeater logic,
      but I'm not sure how to handle the nested looping required to get seven
      items in a row and as many rows as necessary to display all the objects.

      Can anybody provide any suggestions?
        • 1. Re: Newbie layout question.
          ntsiii Level 3
          How about a TileList with columnCount="7"? The rows would automatically be correct.

          Tracy
          • 2. Re: Newbie layout question.
            Level 7
            ntsiii wrote:
            > How about a TileList with columnCount="7"? The rows would automatically be correct.
            >
            > Tracy

            I don't think I want the highlight/selection funtionality of a TileList
            just yet. Each day/block will contain a list of events, those are what
            I will want to highlight/select for drill down.

            Is that the purpose of TileList? TileList is what I have currently
            working as I am modifying the Phones sample, but It seems to not quite
            be what I want at this layer of my display. But I am buy know means
            sure of that opinion.
            • 3. Re: Newbie layout question.
              Level 7
              ntsiii wrote:
              > How about a TileList with columnCount="7"? The rows would automatically be correct.
              >
              > Tracy

              This is what I have worked up, does this make any sense? Am I getting
              close to what I want?

              ...

              private var weeksAry:Array = [0,7,14,21,28,35];

              ...

              <mx:Binding source="days" destination="dayCells.dataProvider"/>

              ...


              <mx:Grid>
              <mx:Repeater id="weekRows" dataProvider="{weeksAry}">
              <mx:GridRow>
              <mx:Repeater id="dayCells" startingIndex="{weekRows.currentItem}"
              count="7">
              <mx:GridItem>
              <mx:Label text="Foobar" />
              </mx:GridItem>
              </mx:Repeater>
              </mx:GridRow>
              </mx:Repeater>
              </mx:Grid>
              • 4. Re: Newbie layout question.
                ntsiii Level 3
                Here is an example:
                Tracy