Hi, I'm using this code to check items from a checkedlistbox and see it in my listbox, I don't know what's the problem, I checked with a breakpoint and apparently the ItemCheck event is not being considered by the debugger.
Here's my code.
public void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (e.NewValue == CheckState.Checked)
{
listBox1.Items.Add(checkedListBox1.SelectedItem.ToString());
}
else
{
listBox1.Items.Remove(checkedListBox1.SelectedItem.ToString());
}
}
private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
listBox1.Text = checkedListBox1.SelectedItem.ToString();
}