如何让用户一键点击检查 CheckedListBox
中的一项?默认行为是第一次单击选择该项目,第二次单击允许您切换检查。我也不想切换选择上的检查,我正在寻找 ListView
控件的行为,在其中我可以直接单击复选框来切换它们,而无需先选择其项目。
最佳答案
CheckedListBox
有一个属性 CheckOnClick
.
CheckOnClick
indicates whether the check box should be toggled whenever an item is selected. The default behavior is to change the selection on the first click, and then have the user click again to apply the check mark. In some instances, however, you might prefer have the item checked as soon as it is clicked.
阅读:How do I CheckOnClick in a CheckedListbox but only when over the checkbox?
关于.net - 检查 CheckedListBox 中的项目而不选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2744541/