0 Replies Latest reply on Apr 13, 2009 11:23 AM by firdosh

    How to make an itemrenderer not draggable for TileList

    firdosh

      So thanks to Alex Harui I figured out how to make a item in a list base component selectable.

       

      override protected function mouseEventToItemRenderer(event:MouseEvent):IListItemRenderer
          {
              var listItem:IListItemRenderer = super.mouseEventToItemRenderer(event);
              if (listItem)
              {
                  if (listItem.data)
                  {
                      if (disabledFunction(listItem.data))
                      {
                          return null;
                      }
                  }
              }
              return listItem;
          }
      

       

      The issue although I am still facing is that when the list component has the dragMoveEnabled property set to true so that I can sort the items in the TileList I can still sort items with the items that are cannot be selected.

       

      -----------------

      | O | O | O |

      -----------------

      | O | O | O |

      -----------------

      | O | X  | X  |

      ----------------

       

      So for example I can sort item O with O . I cannot drag item X since it is not selectable. But I can still sort any item O with item X. Is it possible to that only items that are selectable can be swaped / sorted with items that are selectable.

       

      Thank You,

      Firdosh