C#treeView复选框3状态,Windows应用程序 [英] C# treeView checkbox 3rd state, windows application

查看:140
本文介绍了C#treeView复选框3状态,Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

对于Windows窗体应用程序中的复选框,我想知道是否可以使用第三种状态.例如,如果选中了父项,则将检查所有子项.如果父项未选中,则所有子项都未选中.但是,如果某些孩子被选中,而其他孩子没有选中,我想让父母处于第三状态.声明其中一些孩子已经过检查.

感谢您的时间和赞赏.

Hi everyone

For the check boxes for the in the windows form application, I wonder if there is a 3rd state I could use. For example, if the parent is checked then all of it''s childs are checked. if the parent is unchecked then all of it''s child are unchecked. But if some of the childs are checked, and the others aren''t, I want to have the parent be in a 3rd state. Stating that some of it''s children are checked.

Thanks for the time and apperciation.

推荐答案

这不是那么简单.工具箱中的标准TreeView控件不支持在本地执行此操作,因此您必须自己制作,或找到第三方控件来为您执行此操作.

有几篇CP文章介绍了类似以下操作的内容:此处 [此处 [ ^ ].
It''s not that simple. The standard TreeView control in the ToolBox doesn''t support doing this natively, so you have to make your own, or find a third party control that does this for you.

There''s a couple of CP articles that cover doing something like this here[^] and here[^].


这篇关于C#treeView复选框3状态,Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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