tree拖动

 

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="vertical" fontSize="12"
    verticalAlign="middle"
    backgroundColor="white">
 
 <mx:XML id="xmlDP">
  <root>
   <para label="Paragraph 1" isBranch="true">
    <node label="Lorem ipsum dolor sit amet, consectetuer adipiscing elit." />
    <node label="Cras porttitor nunc a pede." />
    <node label="Nulla ac magna non risus accumsan egestas." />
    <node label="Aenean pretium porta felis." />
    <node label="Sed massa." />
   </para>
   <para label="Paragraph 2" isBranch="true">
    <node label="Pellentesque pretium eros id odio tincidunt lobortis." />
    <node label="Praesent vitae dolor eget nisl adipiscing pretium." />
    <node label="Fusce nonummy dignissim risus." />
    <node label="Nunc sodales, lectus vitae nonummy cursus, augue lectus auctor orci, vel aliquet enim neque vel eros." />
    <node label="Donec laoreet euismod libero." />
    <node label="Etiam ut lectus." />
   </para>
   <para label="Paragraph 3" isBranch="true">
    <node label="Maecenas ut nibh eu diam viverra suscipit." />
    <node label="Pellentesque auctor, turpis vel lobortis suscipit, neque tortor tristique nibh, venenatis suscipit nisl nisl eget magna." />
    <node label="Donec interdum." />
    <node label="Praesent diam." />
   </para>
   <para label="Paragraph 4" isBranch="true">
    <node label="Proin nulla." />
    <node label="Morbi tincidunt, sapien in sollicitudin venenatis, nibh tortor pretium ante, non pharetra urna dolor et libero." />
    <node label="In malesuada risus at neque." />
   </para>
   <para label="Paragraph 5" isBranch="true" />
  </root>
 </mx:XML>
 
 <mx:Tree id="tree"
    dataProvider="{xmlDP}"
    labelField="@label"
    showRoot="false"
    verticalScrollPolicy="on"
    alternatingItemColors="[#FFFFFF,#EEEEEE]"
    showScrollTips="true"
    dragEnabled="true"
    dropEnabled="true"
    dragMoveEnabled="true"
    width="600"
    rowCount="6"  height="400"/>
 
</mx:Application>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值