How to disable a checkbox in a checkedlistbox?

后端 未结 11 773
遥遥无期
遥遥无期 2020-12-03 10:46

I have some items in a CheckedListBox, I want to disable the CheckBox of first item in it.
i.e. I want to disable the first item in the C

11条回答
  •  孤街浪徒
    2020-12-03 11:21

    To disable any particular item use following:

    checkedListBox1.SetItemCheckState(0, CheckState.Indeterminate);
    

    SetItemCheckState takes index of item and CheckState Enum Indeterminate is used to show shaded appearance

提交回复
热议问题