三状态树视图 Windows 窗体
标准 TreeView 的缺点之一是您无法显示部分选择来指示某些子项已被选中。即使树没有完全展开,复杂树中的部分选择也允许用户轻松确定选择的位置。类似的想法也用在手动备份程序中,允许用户选择要备份的文件。
有谁知道如何使树视图复选框中的检查变为灰色?当检查某些(但不是全部)子节点时,我想将父节点的检查灰化。有点像您在软件安装过程中选择要安装的选项时看到的内容。
我看过几个帖子,但比较旧(2000年、2007年)。
现在,2010 年,我需要更好的答案。我用的是VS 2008。 .Net 3.5,Windows窗体
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我正在使用这个 Tri-State TreeView,也来自 CodeProject。工作得很好 - 如果您需要一个更新的项目。
I am using this Tri-State TreeView, also from CodeProject. Works just fine - should you need a project more up to date.
代码项目上有一篇很好的文章就是关于这一点的。 三态 TreeView 控件
There's a nice article on code project about just this. Tri-State TreeView Control