[Gtk-sharp-list] [Mono GTK#] Set Combobox Selected by Value

jaymarvels jacob.spencer80 at googlemail.com
Thu Sep 19 15:56:13 UTC 2013

I don't want to get. I want to set.

I'll explain again

I have a liststore...2 columns

America 10
Belgium 16
England 139
Denmark 166

This is then bound to the combobox.

			cboNations.Clear ();
			Gtk.CellRendererText text = new CellRendererText ();
			cboNations.Model = datalist;
			cboNations.PackStart (text, false);
			cboNations.AddAttribute (text, "text", 0);

I want to set the initial selectedvalue = 139 or something else of my

In winforms this would be done by setting my combobox datasource to a object

And then doing a combobox selectedvalue = 139;

View this message in context: http://mono.1490590.n4.nabble.com/Mono-GTK-Set-Combobox-Selected-by-Value-tp4660923p4660926.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.

More information about the Gtk-sharp-list mailing list