[Gtk-sharp-list] ComboBox newbie

Grant Goodyear g2boojum at gentoo.org
Thu Mar 23 12:19:54 EST 2006


sami.huttu at mtt.fi wrote: [Thu Mar 23 2006, 10:41:55AM CST]
> ComboBox combo = ComboBox.NewText ();
> for (int i = 0; i < 5; i ++)
>     combo.AppendText ("item " + i);
> 
> The problem is how to set some item (eg. "item 1") active as default on
> application start up?

combo.Active = 1; // or any other int from 0 to 4, in your example

-g2boojum-
-- 
Grant Goodyear	
Gentoo Developer
g2boojum at gentoo.org
http://www.gentoo.org/~g2boojum
GPG Fingerprint: D706 9802 1663 DEF5 81B0  9573 A6DC 7152 E0F6 5B76


More information about the Gtk-sharp-list mailing list