TreeView.NET中的Key在哪里? [英] where is the Key in TreeView.NET?

查看:80
本文介绍了TreeView.NET中的Key在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i在VB6中使用TreeView,并且拥有良好的Properity Named(Key)

使用Key我可以转到任何节点我知道他是关键。


但是在VB.NET中我可以找到密钥:(

请告诉我在哪里可以找到TreeView.Net中的密钥...

--------------------------------------- --------

来自Tark的最佳问候


hi
i working with TreeView in VB6, and have good Properity Named (Key)
with the Key i can goto Any Node i know hes Key.

but in VB.NET i can find the Key :(
please tell me where i can find the key in TreeView.Net...
-----------------------------------------------
Best Regards From Tark

推荐答案

" Tark Siala" ta * ******@hotmail.com> schrieb:


首先,请不要将X-posts发给与你无关的团体
问题的主题。
"Tark Siala" <ta*******@hotmail.com> schrieb:

First, please do not make X-posts to groups that are not related to your
question''s topic.
我在VB6中使用TreeView,并且拥有良好的Properity Named(Key)
使用Key我可以转到我认识的任何节点的密钥。

但是在VB.NET中我可以找到密钥:(
请告诉我在哪里可以找到TreeView.Net中的密钥......
i working with TreeView in VB6, and have good Properity Named (Key)
with the Key i can goto Any Node i know hes Key.

but in VB.NET i can find the Key :(
please tell me where i can find the key in TreeView.Net...




.NET Windows窗体树视图控件不提供按键查找。你可以做的是
将密钥存储在''TreeNode''''Tag''属性中然后

将节点添加到''Hashtable ''(使用''标签''属性'的值作为键,并使用'/ Tree $'
对''TreeNode''对象的引用作为值)。然后你可以很容易地通过它的键查找一个节点。


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://dotnet.mvps.org/dotnet/faqs/>



The .NET Windows Forms treeview control doesn''t provide lookup by key. What
you can do is storing the key in the ''TreeNode''''s ''Tag'' properties and then
add the nodes to a ''Hashtable'' (use the ''Tag'' property''s value as key and
the reference to the ''TreeNode'' object as value). Then you can easily
lookup a node by its key.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


嗨塔克,


首先,我想告诉你它是VB6的gropu用户以及与dot net相关的任何查询都可以查看以下网站

microsoft.public.dotnet.general

microsoft.public.dotnet.languages.vb


至于您的查询,.NET Windows窗体树视图控件不提供按键查找。您可以做的是将密钥存储在'TreeNode''''Tag''属性中,然后将节点添加到''Hashtable''(使用''Tag''property'的值作为key和''TreeNode''对象的引用作为值)。然后你可以通过它的键轻松查找节点。


HTH


Mona

" Tark Siala" < TA ******* @ hotmail.com>在留言新闻中写道:%2 **************** @ TK2MSFTNGP11.phx.gbl ...
Hi Tark,

Firstly,I would like to tell you that it''s a gropu for VB6 users and for any queries related to dot net u can check out the following sites
microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb

As for your query, The .NET Windows Forms treeview control doesn''t provide lookup by key. What you can do is storing the key in the ''TreeNode''''s ''Tag'' properties and then add the nodes to a ''Hashtable'' (use the ''Tag'' property''s value as key and the reference to the ''TreeNode'' object as value). Then you can easily lookup a node by its key.

HTH

Mona
"Tark Siala" <ta*******@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...


我在VB6中使用TreeView,并拥有良好的Properity Named(Key)
使用Key我可以转到任何节点我知道他的密钥。

但是在VB.NET中我可以找到密钥: (
请告诉我在哪里可以找到TreeView.Net中的密钥......
------------------------- ----------------------
最好的问候来自Tark

hi
i working with TreeView in VB6, and have good Properity Named (Key)
with the Key i can goto Any Node i know hes Key.

but in VB.NET i can find the Key :(
please tell me where i can find the key in TreeView.Net...
-----------------------------------------------
Best Regards From Tark



>" Mona(Grapecity)< mo ** @ discuss.microsoft.com>在消息中写道
> "Mona (Grapecity)" <mo**@discussions.microsoft.com> wrote in message
news:ez *********** *** @ TK2MSFTNGP15.phx.gbl ...
嗨Tark,

至于您的查询,.NET Windows窗体树视图控件没有提供
查找您可以做的是将密钥存储在''TreeNode'''''''''属性中,然后将>节点添加到''Hashtable''(使用''标签''
属性'的值为k ey和''TreeNode''对象的引用为
值)。然后你可以通过它的键轻松查找一个节点。
news:ez**************@TK2MSFTNGP15.phx.gbl...
Hi Tark,

As for your query, The .NET Windows Forms treeview control doesn''t provide
lookup by key. What you can do is storing the key in the ''TreeNode''''s
''Tag'' properties and then add > the nodes to a ''Hashtable'' (use the ''Tag''
property''s value as key and the reference to the ''TreeNode'' object as
value). Then you can easily lookup a node by its key.




哦是的...这比拥有Key属性要好得多。对于

而言,.Net更具生产力。是吗? Gimme休息。


-

Ken Halter - MS-MVP-VB - http://www.vbsight.com

请保持小组讨论的所有内容..



Oh yeah... that''s SO much better than having a Key property. So much for
".Net is more productive" eh? Gimme a break.

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..


这篇关于TreeView.NET中的Key在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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