1 Reply Latest reply on Sep 8, 2008 6:59 AM by EvolvedDSM

    Using ItemRender

    LucaL8
      Hi to all.
      I've got a question for you.
      I have a TileList with a custom ItemRender that implements one function: ChangeBG.
      When i select one item on a TileList i want to access to its ItemRender and call the function ChangeBG.
      How can i do this? Selected item have a method that return his itemRender (his instance i think..)

      Thanos to all!
      Tiziano
        • 1. Re: Using ItemRender
          EvolvedDSM Level 2
          Here's an example from one of my datagrids (same concept as TileList I believe)

          <mx:DataGridColumn>
          <mx:itemRenderer>
          <mx:Component>
          <mx:Button click="outerDocument.doSomething()" icon="@Embed('../assets/images/undo.png')" toolTip="Out Table"/>
          </mx:Component>
          </mx:itemRenderer>
          </mx:DataGridColumn>

          In this example, my itemRenderer uses a button component. There's a click function that calls the method 'doSomething()' however it will only work if you specify outerDocument before it. I'm not 100% sure on why it requires this, but that's the only way I've seen it work. Hopefully this helps you.