I kind of new in C#, my problem is how to add checked items from a checkedlistbox to a listbox, and when I uncheck this item remove it from the listbox also.. Thanks!
If you have checkedListBox1
as checkedListBox
and your listBox
called listBox1
, you should add this ItemCheck Event
for your checkedListBox
private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (e.NewValue == CheckState.Checked)
listBox1.Items.Add(checkedListBox1.Items[checkedListBox1.SelectedIndex]);
if (e.NewValue == CheckState.Unchecked)
listBox1.Items.Remove(checkedListBox1.Items[checkedListBox1.SelectedIndex]);
}