[Gtk-sharp-list] How do I clear every current entry in a combo box?
ianwbarlow
ianwbarlow at hotmail.com
Wed Jun 15 09:04:06 EDT 2011
Hi All,
Below is the code that worked in the end
Many Thanks to,,,,,
Jim Orcheson & Krzysztof
(http://lists.ximian.com/pipermail/gtk-sharp-list/2011-June/010734.html)
Clear combobox,set render then fill as normal (via ListStore)
ListStore store = new ListStore(typeof(string));
CellRendererText ct = new CellRendererText();
combobox_files.Clear();
combobox_files.PackStart(ct, false);
combobox_files.AddAttribute(ct, "text", 0);
store.Clear();
combobox_files.Model = store;
store.AppendValues("A");
store.AppendValues("B");
store.AppendValues("C");
--
View this message in context: http://mono.1490590.n4.nabble.com/How-do-I-clear-every-current-entry-in-a-combo-box-tp3596289p3599335.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
More information about the Gtk-sharp-list
mailing list