Three State Treeview Windows Forms

怎甘沉沦 提交于 2019-12-10 10:17:42

问题


One of the frustrations with the standard TreeView is that you can't show a partial selection to indicate that some of the children are selected. A partial selection in a complex tree allows the user to easily determine where the selections are, even if the tree is not completely expanded. A similar idea is used in manu backup programs to allow the user to select the files to be backed up.

Does anyone know of a way to make the checks in a treeview checkbox gray? I want to gray the check of a parent node when some (but not all) of its child nodes are checked. Kinda like what you see when you are selecting options to install during a software installation.

I have seen several post, but is older (2000, 2007 year).

I now, in 2010, the better answer possible is required. I use VS 2008 . Net 3.5 , Windows Forms


回答1:


There's a nice article on code project about just this. Tri-State TreeView Control




回答2:


I am using this Tri-State TreeView, also from CodeProject. Works just fine - should you need a project more up to date.



来源:https://stackoverflow.com/questions/3051339/three-state-treeview-windows-forms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!