加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

FLEX学习-3 树形控件和分割器

发布时间:2020-12-15 03:58:58 所属栏目:百科 来源:网络整理
导读:1、在flash builder 4.0中新建一个MXML应用程序; 2、在.mxml中增加如下的内容: ? ?xml version="1.0" encoding="utf-8"? s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" ????? xmlns:s="library://ns.adobe.com/flex/spark" ????? xmlns:mx="lib

1、在flash builder 4.0中新建一个MXML应用程序;

2、在.mxml中增加如下的内容:

?

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
????? xmlns:s="library://ns.adobe.com/flex/spark"
????? xmlns:mx="library://ns.adobe.com/flex/mx">
?<fx:Declarations>
??<fx:XMLList id="tree">
???<dataroots label="省市">
????<data label="北京市"/>
????<data label="辽宁省">
?????<subdata label="沈阳市" />
?????<subdata label="铁岭市"/>
?????<subdata label="大连市"/>
????</data>????????
???</dataroots>?
??</fx:XMLList>?
?</fx:Declarations>
?<mx:HDividedBox width="100%" height="100%">
??<s:Panel title="Panel1" width="35%" height="100%">
???<mx:Tree id="tree1" width="100%" height="100%"
????? dataProvider="{tree}" labelField="@label" showRoot="true"/>
??</s:Panel>
??<mx:VDividedBox width="65%" height="100%">
???<s:Panel title="Panel2" width="100%" height="40%">
????<s:TextArea text="This is VDividedBox Example!" width="100%" height="100%"/>
???</s:Panel>
???<s:Panel title="Panel3" width="100%" height="60%">
????<s:TextArea text="This is VDividedBox Example2!" width="100%"
???????height="100%"/>
???</s:Panel>?
??</mx:VDividedBox>
?</mx:HDividedBox>?
</s:Application>

4、编译后为如下效果

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读