Skip navigation
FlexScripter1453
Currently Being Moderated

re-order mx list items

Mar 27, 2013 12:15 PM

I'm having issues with re-ordering items inside an mx:list. 

 

<mx:List

                    id="layersList"

                    dragEnabled="true"

                    dropEnabled="true"

                    dragMoveEnabled="true"

                    includeInLayout="true"

                    visible="false"

                    initialize="application.setUpLayers()"

                    dataProvider='{layerData}'

                    data='{layerData}'

                    selectedIndex="{application.getLayerListIndex()}"

                    render='{layersList.selectedIndex=application.getLayerListIndex()}'

                    itemRenderer="renderers.LayerRenderer"

                    width="100%"

                    height="100%"

                    bottom="50"

                    alternatingItemColors="[#e2e2e2, #dedede]"

                    selectionColor="#f7f7f7"

                    rollOverColor="#5A5A5A"

                    borderVisible="false"

                    />

 

When I "drop" one of the items that I drag nothing happens.  Am I missing somthing?

 
Replies
  • Currently Being Moderated
    Mar 29, 2013 11:17 AM   in reply to FlexScripter1453

    When I "drop" one of the items that I drag nothing happens.  Am I missing somthing?

      

     

    After you finish dragging something, you have to do a function to handle the drag.

     

      dragComplete="" dragDrop="" dragEnter="" dragExit="" dragOver="" dragStart=""
    
    

     

    You probably want to use dragComplete, if you are just dragging something off the list to remove it.

     

    Dispatched by the drag initiator (the component that is the source of the data being dragged) when the drag operation completes, either when you drop the dragged data onto a drop target or when you end the drag-and-drop operation without performing a drop.

     

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points