如何在 flex 中选择树中的某个节点? [英] How do I select a certain node in a tree in flex?

查看:23
本文介绍了如何在 flex 中选择树中的某个节点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取单个节点的属性,例如我为其设置的名称或其他内容.我怎么能只选择这个节点呢?我可以通过一个事件来做到这一点

I'm trying to get properties for one single node such as the name I've set for it or something. How can I go by just selecting this one node? I can do it with an event

e.currentTarget.selectedItem.@name;

但是我需要在没有事件的情况下抓住它,我该怎么做?

But I need to grab it without the event, how can I go by doing this?

推荐答案

最好从 xmlTree 的数据提供者那里获取数据,因为它是一个 XML/XMLList,你可以随时使用像

it's better to get data from your data provider for xmlTree, because it's a XML/XMLList you can always use construction like

myxml.nodename[0].@attribute

myxml.nodename[0].@attribute

这篇关于如何在 flex 中选择树中的某个节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆