1 Reply Latest reply on Feb 8, 2007 7:56 AM by 187_2007

    Drag and Copy from <mx:List> to <mx:List> ??

    WestSide
      Hi,

      I want to do this in flex:

      http://www.mattkruse.com/javascript/optiontransfer/

      How can this be done?

      Any help appreciated.

      -Westside
        • 1. Drag and Copy from <mx:List> to <mx:List> ??
          187_2007 Level 1
          How about Drag and Drop?



          <?xml version="1.0"?>
          <!-- dragdrop\SimpleListToListBothWays.mxml -->
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
          width="500" height="200"
          borderStyle="solid"
          creationComplete="initApp();">

          <mx:Script>
          <![CDATA[
          private function initApp():void {
          srclist.dataProvider = ['Reading', 'Television', 'Movies'];
          destlist.dataProvider = [];
          }
          ]]>
          </mx:Script>

          <mx:HBox>
          <mx:VBox>
          <mx:Label text="Available Activities"/>
          <mx:List id="srclist"
          height="100"
          allowMultipleSelection="true"
          dragEnabled="true"
          dropEnabled="true"
          dragMoveEnabled="true"/>
          </mx:VBox>

          <mx:VBox>
          <mx:Label text="Activities I Like"/>
          <mx:List id="destlist"
          height="100"
          allowMultipleSelection="true"
          dragEnabled="true"
          dropEnabled="true"
          dragMoveEnabled="true"/>
          </mx:VBox>
          </mx:HBox>
          </mx:Application>