
转载请保持文章完整性!
本文链接地址:http://blog.desizen.com/4lone/542.html
主页:joel's blog
这个例子进行的是Tourdeflex:UI Controls:Tree and Grid Controls:Tree
简介:
The Tree control lets a user view hierarchical data arranged as an expandable tree. Each item in a tree can be a leaf or a branch. A leaf item is an end point in the tree. A branch item can contain leaf or branch items, or it can be empty.
例子:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top" horizontalAlign="center" backgroundGradientColors="[0x000000,0x323232]" paddingTop="0" viewSourceURL="srcview/index.html"> <mx:Script> <![CDATA[ [Bindable] public var selectedNode:XML; // Event handler for the Tree control change event. public function treeChanged(event:Event):void { selectedNode=Tree(event.target).selectedItem as XML; } ]]> </mx:Script> <mx:XMLList id="treeData"> <node label="Mail Box"> <node label="Inbox"> <node label="Marketing"/> <node label="Product Management"/> <node label="Personal"/> </node> <node label="Outbox"> <node label="Professional"/> <node label="Personal"/> </node> <node label="Spam"/> <node label="Sent"/> </node> </mx:XMLList> <mx:Panel title="Tree Control" layout="vertical" color="0xffffff" borderAlpha="0.15" width="500" paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center"> <mx:Label width="100%" color="0x323232" text="Select a node in the Tree control."/> <mx:HDividedBox width="100%" height="100%" color="0x323232"> <mx:Tree id="myTree" width="50%" height="100%" labelField="@label" showRoot="false" dataProvider="{treeData}" change="treeChanged(event)"/> <mx:TextArea height="100%" width="50%" text="Selected Item: {selectedNode.@label}"/> </mx:HDividedBox> </mx:Panel> </mx:Application>
标签:FLEX, TourDeFlex, Tree, 例子

还没改好啊!!!!!
改好了,现在就是在ie6下面回复,ie6真的是麻烦多多