Repopulate a combo box
问题 This is how I populate the combo box: foreach(string s in entries) { string[] fields = someSplit(s); threadComboBox.AppendText(fields[0]); } How would I remove all items and add new ones? I tried calling Clear() , but while it does remove old values, new ones don't get added. 回答1: try threadComboBox.Clear(); ListStore store = new ListStore(typeof (string)); threadComboBox.Model = store; foreach(string s in entries) { string[] fields = someSplit(s); store.AppendValues (fields[0]); } 回答2: The