- 首先设置控件属性CheckOnClick为true
- 添加事件ItemCheck
添加代码如下:
for(int i = 0; i < checkedListBox1.Items.Count; i++)
{if(i != e.Index){checkedListBox1.SetItemCheckState(i,CheckState.Unckecked);}
}
- 添加事件SelectedIndexChanged
for(int i = 0; i < checkedListBox1.Items.Count; i++)
{if(checkedListBox1.GetItemChecked(k)){}
}
上片段代码的空白部分为你需要的操作














