0 Replies Latest reply on Jun 20, 2007 6:30 AM by sean_hess

    <mx:List> How can I select dragged item

    sean_hess
      Hey everybody,

      I'm working on a List which is supposed to allow drag and drop support. It works.

      However, after dragging to copy (when it has the little plus sign and adds an item), I can no longer select the item that I dragged.

      Why? How can I fix this?

      Thanks!
      [CODE]
      <mx:List
      id="questions"
      dataProvider="{dataSource}"
      dragEnabled="true"
      dropEnabled="true"
      dragMoveEnabled="true"
      labelField="@id"
      />

      <mx:Script>
      <![CDATA[
      import mx.collections.XMLListCollection;
      import mx.controls.Alert;

      [Bindable]
      public var dataSource:XMLListCollection;

      public var quiz:XML;

      private function complete():void {
      quiz = <quiz name="henry">
      <question id="question one"/>
      <question id="question two"/>
      <question id="question three"/>
      <question id="question four"/>
      </quiz>;

      dataSource = new XMLListCollection();
      dataSource.source = quiz.question;
      }
      ]]>
      </mx:Script>

      [/CODE]