在窗体上具有三态功能的VB.Net树视图 [英] VB.Net treeview with tristate functionality on form
问题描述
大家好,
有人可以告诉我在VB.Net中创建三态树视图该怎么做吗?我需要它根据子节点的检查状态来更改父节点的检查状态(已检查,混合或未检查),并且还需要在检查父节点时检查/取消选中所有子节点.
我知道在线上有示例,但是我不太擅长编程,它们全都使用另一种语言,或者使我感到困惑.我已经将Treeview控件添加到表单中,并且可以正确地填充它(我以编程方式执行),但是我不知道如何使用三态功能.
谢谢!
Hi guys,
Can someone please tell me what I have to do to create a tri-state treeview in VB.Net? I need it to change the check state of parent nodes (checked, mixed or unchecked) based on the checkstate of the child nodes, and also to check/uncheck all child nodes when the parent node is checked.
I know there are examples online but I am not very good at programming and they all are either in another language or confuse me. I have added a treeview control to a form, and I can get it to populate correctly (which i do programmatically) but I have no idea how to work the tri-state functionality.
Thank you!
推荐答案
OP找到了解决方案并解决了问题.这只是为了解决未解决的问题.
OP has found a solution and resolved the question. This is just to pop this out of unanswered question.
本文对我有用
VB.NET中的TriStateTreeview [
This article worked for me
TriStateTreeview in VB.NET[^]
这篇关于在窗体上具有三态功能的VB.Net树视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!