树视图TreeNodeCollection关键 [英] TreeView TreeNodeCollection Key

查看:103
本文介绍了树视图TreeNodeCollection关键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TreeView的使用在其基础实现TreeNodeCollection。几乎在每一个重载的add方法的TreeNodeCollection要求的关键。

The TreeView uses in its underlying implementation the TreeNodeCollection. The TreeNodeCollection in almost every overload of the add method asks for a key.

它还实现indexOfKey和的containsKey但似乎没有办法确定节点的从节点本身或从任何事件您通常会使用如密钥TreeView_AfterSelect()。

It also implements indexOfKey and ContainsKey yet there appears to be no way to determine the key of a node from the node itself or from any of the events you would typically use such as TreeView_AfterSelect().

我是正确或者是有其实天晓得检索一个节点或事件,我忽略了关键的?假设我是正确的。为什么地球上是它以这样的方式来实现? 我唯一​​能想到的是,也许TreeNodeCollection.Key是德precated?但我看到没有提到这个...

Am I correct or is there in fact someway to retrieve the key from a node or event which I have overlooked? And assuming I am correct. Why on earth was it implemented in such a way? The only thing I could think of was that perhaps TreeNodeCollection.Key is deprecated? But I see no mention of this…

PS:我知道了TreeNode.Tag财产,以及它如何被用于同样的效果

PS: I am aware of the TreeNode.Tag property and how it can be used to the same effect.

推荐答案

看看的这里。在讲话,你会发现下面的

Take a look here. In the remarks you'll find the following

的名称属性对应的关键在TreeNodeCollection一个树节点。

The Name property corresponds to the key for a TreeNode in the TreeNodeCollection.

这篇关于树视图TreeNodeCollection关键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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