树状图问题 [英] Treeview issue

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

问题描述

大家好,

我有一个带有rootnode和子节点的Treeview,我为每个节点都添加了一些文件.
现在我的问题是-在将文档添加到特定节点后,我只需要扩展该节点,而不是仅扩展所有父节点即可.请尽快帮我.


谢谢大家.

Hi All,

I have a Treeview with rootnode and child nodes.I am adding some files for each and every nodes.
Now my question is--after adding documents to the particular node i need to expand that node only not all parent nodes.how to do? please help me asap.


Thanks All.

推荐答案

TreeNode类具有Expand方法,您可以使用该并使用Parent属性向上移动树扩大所有父母. (可选)您可以使用EnsureVisible方法为您完成所有操作. (已编辑,您只想扩展子节点,而不是父节点).

您应该真正尝试阅读文档 [
The TreeNode class has an Expand method, you could use that and walk up the tree using the Parent property to expand all parents. Optionally you could use the EnsureVisible method which does all of that for you. (edited, you only want to expand child nodes, not parent nodes).

You should really try reading the documentation[^] sometime. It''ll help you discover the answers to question like this all by yourself.


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

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