0 Replies Latest reply on Feb 16, 2009 3:22 AM by sulletf

    Tree leaf drag to bottom folder

    sulletf
      Hi !

      With the following code, it seems impossible to drag leaf "rio" (for instance) and drop it as the last child of "Europe" when leaf "Spain" is expanded.
      The only thing possible is to drop it as a child of "Spain" or as a new and last root leaf.
      This does not seem to be normal as you could drop "rio" between "Spain" and "England", hence as a child of "Europe"
      Thanks !


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="init()">
      <mx:Script>
      <![CDATA[

      private function init():void {
      for each ( var child:XML in treeData..node ) tree.expandItem(child, true);
      }

      ]]>
      </mx:Script>
      <mx:XML id="treeData" xmlns="">
      <root>
      <node label="Americas">
      <node label="US">
      <node label="New York" />
      <node label="Chicago" />
      <node label="Los Angeles" />
      </node>
      <node label="Brazil">
      <node label="Sao Paolo" />
      <node label="Brazilia" />
      <node label="Rio" />
      </node>
      </node>
      <node label="Europe">
      <node label="England">
      <node label="London" />
      <node label="Manchester" />
      </node>
      <node label="Spain">
      <node label="Madrid" />
      <node label="Barcelona" />
      </node>
      </node>
      </root>
      </mx:XML>
      <mx:Tree width="100%" height="70%" id="tree"
      labelField="@label"
      dataProvider="{treeData.node}"
      allowMultipleSelection="false"
      dragEnabled="true"
      dropEnabled="true"
      dragMoveEnabled="true"/>
      </mx:Application>
      last