private void falseNegatives_SelectedIndexChanged(object sender, EventArgs e) { int i = ((ListBox)sender).SelectedIndex; if (((Instruction)((ListBox)sender).SelectedItem) != null) { Program2.SetSelected(((Instruction)((ListBox)sender).SelectedItem).index, true); } if (i != -1) { falsePositives.ClearSelected(); Ok.ClearSelected(); } //falseNegatives.SelectedIndex = i; //falseNegatives.SelectedIndex = i; }