You can try handling SelectedIndexChanged event and clearing the
selection there. This got rid of the selection after the click for me,
but there still was a temporary selection that flashed as you click
the checkbox. This code just removes it immediately.
private void checkedListBox1_SelectedIndexChanged(object sender,
EventArgs e)
{
int index = checkedListBox1.SelectedIndex;
if(index > -1)
{
checkedListBox1.SetSelected(index, false);
checkedListBox1.SetItemChecked(index, !
checkedListBox1.CheckedIndices.Contains(index));
}
}
================
Clay Burch
Syncfusion, Inc.
Jared - 06 Feb 2007 22:52 GMT
> You can try handling SelectedIndexChanged event and clearing the
> selection there. This got rid of the selection after the click for me,
[quoted text clipped - 17 lines]
> Clay Burch
> Syncfusion, Inc.
Thanks Clay, that works pretty well. I had to eliminate
SetItemChecked() or the checkbox would never change state. Looks like
SetSelected() was exactly what I needed.
Cheers!
Jared