I have a checkedListBox which puts the string to a textbox when an item is checked.
private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (checkedListBox1.GetItemCheckState(e.Index) == CheckState.Checked)
{
textBox1.Text = textBox1.Text + checkedListBox1.Items[e.Index].ToString();
}
}
This doesn't seem to work properly, When I check an item it doesn't do anything and when I unchecked an item the string gets added to the textbox.
How do I check if the item is going to be checked or unchecked, the code I have seems to be working if the checkbox WAS checked.