如何从 TreeNode.FullPath 数据获取实际的树节点?
我想存储来自 TreeNode.FullPath 的一些数据,然后我想重新扩展到目前为止的所有内容。有简单的方法吗?
多谢!
I would like to store some data from TreeNode.FullPath and then later i would like to re-expand everything up to that point. Is there a simple way of doing it?
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用完整路径和 TreeNode.Text 的比较来定位特定的树节点。
You are able to locate the specific treenode using comparison of fullpath and TreeNode.Text.
您可以将其作为
TreeNodeCollection
的扩展方法编写:You can write it as an extension method to the
TreeNodeCollection
:我遇到了类似的问题(但我只是想再次找到树节点)并发现了这个:
http://c-sharpe.blogspot.com/2010/01/get-treenode-from-full-path.html
我知道它只能回答您问题的一部分,但总比没有回复好;)
I had a similar problem (but I just wanted to find the treenode again) and found this:
http://c-sharpe.blogspot.com/2010/01/get-treenode-from-full-path.html
i know it only answers part of your problem, but better than no replies at all ;)