2 Replies Latest reply on Sep 2, 2009 11:36 PM by kgpatel

    List with item renderer using the tile layout

    kgpatel Level 1



      I am facing problem using list with item rnder


      Below is my list componet


      protected function list_clickHandler(event:MouseEvent):void
                      var list : List = List(event.currentTarget);
                        // the data of the clicked row, change the name of the class to your own
                        var item :Image = Image(list.selectedItem);



      <s:List id="list" dataProvider="{dataProver}" height="100%" width="100%"
                  mouseDown="list_clickHandler(event)"  >
                          <s:TileLayout requestedColumnCount="3"
                                  verticalGap="35" columnWidth="100" rowHeight="100"
                                      <mx:Image height="100%" width="100%" source="{data.Image}" scaleContent="false"/>


      I an not getting the current item of the list ,, and geeting err ,, selected index == -1 ;;


      aslo in flex 4 there is not the properrty like




      var rowRenderer : UIComponent = UIComponent(list.indexToItemRenderer(list.selectedIndex));