How to disable a checkbox in a checkedlistbox?

后端 未结 11 734
遥遥无期
遥遥无期 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:17

    I know it has been a while, but I found this in my search for a list box and thought I would add it to the discussion.

    If you have a listbox and want to disable all of the checkboxes so they cannot be clicked, but not disable the control so the user can still scroll etc. you can do this:

    listbox.SelectionMode = SelectionMode.None
    

提交回复
热议问题