1 Reply Latest reply on Sep 23, 2008 7:05 PM by Newsgroup_User

    TileList

    pyso
      Hi,
      I created myComponent (which extends Canvas). Later in my main application when I insert it into VBox like:

      <mx:VBox>
      <ns:MyComponent>
      </mx:VBox>

      everything is OK and myComponent is drawn on screen.
      But problem is when I want to insert it into TileList (the reason is that I will have an array of myComponent). So when I write something like this:

      <mx:TileList >
      <mx:Array>
      <ns:myComponent/>
      </mx:Array>
      </mx:TileList>

      then I can see that there was inserted one item into TileList but it's empty.

      Should I use TileListItemRenderer in this case? Or how should I arrange myComponent is drawn the same way as it was in VBox ?

      Thanks,
      //pyso
        • 1. Re: TileList
          Level 7

          "pyso" <webforumsuser@macromedia.com> wrote in message
          news:gbb3fn$kp7$1@forums.macromedia.com...
          > Hi,
          > I created myComponent (which extends Canvas). Later in my main application
          > when I insert it into VBox like:
          >
          > <mx:VBox>
          > <ns:MyComponent>
          > </mx:VBox>
          >
          > everything is OK and myComponent is drawn on screen.
          > But problem is when I want to insert it into TileList (the reason is that
          > I
          > will have an array of myComponent). So when I write something like this:
          >
          > <mx:TileList >
          > <mx:Array>
          > <ns:myComponent/>
          > </mx:Array>
          > </mx:TileList>
          >
          > then I can see that there was inserted one item into TileList but it's
          > empty.
          >
          > Should I use TileListItemRenderer in this case? Or how should I
          > arrange
          > myComponent is drawn the same way as it was in VBox ?

          Let the TileList draw the components based on the dataProvider and
          itemRenderer properties. Please consult the docs on data driven components.
          If you look at the FAQ
          http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf, the first
          answer has a good list of places you could start.

          HTH;

          Amy