在树视图中为子节点添加名称 [英] Add a name to a child Node in a treeview
本文介绍了在树视图中为子节点添加名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
简单,
'如果我有Mynode作为新Treenode
'虽然我是读取我的数据库
'我定义每个parentNode并为它们指定一个名称,含
Mynode.name = x
'但是当我定义我的childNodes
'i也想给他们一个名字
'我想写这样的东西,但这显然不起作用
Mynode.child.name = y
我怎么能这样做? ?
非常感谢!
解决方案
您需要从 TreeNode.Nodes
collection [ ^ ]的家长。获得实际节点后,您可以设置其名称。
MyNode.nodes(0).name = y
Simply,
'If i have Mynode as New Treenode
'While i'm reading my database
'i define each parentNode and assign them a name, with
Mynode.name = x
'But when i define my childNodes
'i also want to give them a name
'I want to write something like this, but this is obviously not working
Mynode.child.name= y
How could i do this????
Thank you so much!
解决方案
You need to find the child node from the TreeNode.Nodes
collection[^] of the parent. Once you have the actual node then you can set its name.
MyNode.nodes(0).name=y
这篇关于在树视图中为子节点添加名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文