How to get rid of checkedlistbox selection highlighting effect?

Emrah Diril picture Emrah Diril · Dec 2, 2008 · Viewed 15.6k times · Source

When an item is clicked in the checkedlistbox, it gets highlighted. How can I prevent this highlighting effect?

I can hook into the SelectedIndexChanged event and clear the selection, but the highlighting still happens and you see a blip. In fact, if you hold down the mouse click, never releasing it after you clicked on the checkbox area, the selection remains highlighted until you release the mouse button. I basically want to get rid of this highlighting effect altogether.

Answer

victoria picture victoria · Jun 8, 2012

Use the following:

private void checkedListBox1__SelectedIndexChanged(object sender, EventArgs e)
        {
            checkedListBox1.ClearSelected();
        }