Using the itemDoubleClick event to open nodes in a Flex Tree control
The following example shows how you can use the itemDoubleClick
event to open the selected Tree node in Flex.
<!-- http://blog.flexexamples.com/2007/11/29/using-the-itemdoubleclick-event-to-open-nodes-in-a-flex-tree-control/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal"
verticalAlign="middle"
backgroundColor="white"
creationComplete="init();">
<mx:Script>
<![CDATA[
import mx.events.ListEvent;
private function tree_itemDoubleClick(evt:ListEvent):void {
var node:XML = tree.selectedItem as XML;
var isOpen:Boolean = tree.isItemOpen(node);
tree.expandItem(node, !isOpen);
}
]]>
</mx:Script>
<mx:XMLListCollection id="xmlListColl">
<mx:source>
<mx:XMLList>
<node label="One">
<node label="One.1">
<node label="One.1.1">
<node label="One.1.1.1">
<node label="One.1.1.1.1" />
</node>
</node>
</node>
<node label="One.2" />
<node label="One.3" />
</node>
<node label="Two">
<node label="Two.1" />
<node label="Two.2" />
<node label="Two.3" />
</node>
<node label="Three" />
</mx:XMLList>
</mx:source>
</mx:XMLListCollection>
<mx:ApplicationControlBar dock="true">
<mx:CheckBox id="checkBox"
label="doubleClickEnabled:"
labelPlacement="left"
selected="true" />
</mx:ApplicationControlBar>
<mx:Tree id="tree"
dataProvider="{xmlListColl}"
labelField="@label"
width="250"
rowCount="6"
doubleClickEnabled="{checkBox.selected}"
itemDoubleClick="tree_itemDoubleClick(event);"
showScrollTips="true" />
</mx:Application>
Using the itemDoubleClick event to open nodes in a Flex Tree control相关推荐
- Elastic Nodes Example 翻译及学习整理
文章目录 Elastic Nodes Example 翻译及学习整理 题记: 简介: Node Class Definition Edge Class Definition GraphWidget C ...
- WebKit DOM Event (一)
DOM Event 规范 DOM Event 主要定义了三类接口: EventTarget, 所有DOM节点和XMLHttpRequest 都实现EventTarget接口 class EventTa ...
- What is event bubbling and capturing?
What is event bubbling and capturing? 答案1 Event bubbling and capturing are two ways of event propaga ...
- [Swift]LeetCode1110. 删点成林 | Delete Nodes And Return Forest
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ ➤微信公众号:山青咏芝(shanqingyongzhi) ➤博客园地址:山青咏芝(https://www.cnblog ...
- G6实现标签拖动连线画流程图
需求描述 列出所有的task标签,拖动task标签在一旁画流程图,打包task的任务名及id和任务的执行流程以json的格式发给后端. 技术栈 G6,vue,h5自带的draggable实现拖动.也稍 ...
- 关系型数据库是如何运作的
一说到关系型数据库,我总感觉缺了点什么.如果你尝试透过"关系型数据库是如何运作的"的关键词句来进行搜索,其搜索结果是少量的而且内容是简短的.难道说是由于它已经太老旧而已经不再流行吗 ...
- 如果有人问你关系数据库的工作原理,叫他看这篇文章How does a relational database work
When it comes to relational databases, I can't help thinking that something is missing. They're used ...
- How does a relational database work
How does a relational database work NOSQL跟SQL一样,在内存中都是用hash table,都是key-value 只不多nosql几乎无锁,无事务,速度更快, ...
- 转载:js跨域问题小结
本文来自:http://www.kuqin.com/webpagedesign/20090422/47458.html javascript出于安全方面的考虑,是不允许跨域调用其他页面的对象的.但在安 ...
最新文章
- css层叠样式表(一)
- axios的this指向_vue使用axios中 this 指向问题
- ContentType大全
- stm32串口学习(二)
- vs 服务容器中已存在服务_敏捷基础设施和公共基础服务
- nyoj 21 三个水杯 BFS
- jquery获取java对象的属性_jQuery - 获得内容和属性
- 禁止和开启组策略的批处理
- .NET/C# 使用Stopwatch测量运行时间
- Facebook Cache Token Issue
- Leetcode-Implement strStr()-Python
- matlab程序是什么格式,科学网—Matlab中的P代码文件 - 杨笔锋的博文
- 性能测试,CPU使用率CPU负载率理解
- 在word中给方框打勾
- 为什么面试完,总是让你回去等通知?
- iOS多线程的初步研究(三)-- NSRunLoop
- Windows7下按装使用vagrant踩坑总结及Vagrant常见镜像简单配置
- 日本某地(我猜应该是在米花町)发生了一件谋杀案,警察通过排查确定杀人凶手必为4个嫌疑犯的一个。
- 自考计算机英语难度,自考本科商务英语专业真的难吗
- Android 8.0以上系统应用如何保活