protected override void SetContents(IList contents) { //**************************************** ListBox MyListBox; ComboBox MyComboBox; //**************************************** if (_ListControl is ListBox) { MyListBox = (ListBox)_ListControl; MyListBox.BeginUpdate(); MyListBox.Items.Clear(); foreach (object Value in contents) { MyListBox.Items.Add(Value); } MyListBox.EndUpdate(); } else if (_ListControl is ComboBox) { MyComboBox = (ComboBox)_ListControl; MyComboBox.BeginUpdate(); MyComboBox.Items.Clear(); foreach (object Value in contents) { MyComboBox.Items.Add(Value); } MyComboBox.EndUpdate(); } }