Disable and grey out a check box of treenode

删除回忆录丶 提交于 2019-12-14 03:09:29

问题


I need to create a treeview that some nodes in the tree will have checkbox and other nodes will have a disable checkbox - that looks gray as disable. once the user check the disable check box the check box image will be changed to a different image (-checked but still grey). this treeview will have also icon , besides the check box. (I'm using the winform treeview control)

thanks in advance,


回答1:


You can set the ShowCheckBox property of the node to False, and the ImageUrl to a picture of a disabled checkbox. It sounds like you might be using the ImageUrl for something else, though, so you might need to create your icons for these nodes so that they show your icon and also a disabled checkbox.



来源:https://stackoverflow.com/questions/6431681/disable-and-grey-out-a-check-box-of-treenode

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