heatxsink at gmail.com
Tue Jan 3 08:32:56 EST 2006
On 1/3/06, Evgeny Pirogov <pirogov.e at gmail.com> wrote:
> Hello. Happy New Year!
> I need simple example for Gtk.ComboBox usage as DropDownList (value only
> set from list, no write).
Check Monodoc I think what you are looking for should be in the sample code
in the overview section. It's also located in the web version of the
documentation at http://www.go-mono.com/docs/ under Gnome
Libraries->Gtk->ComboBox Class. Just in case you cannot access the web
documentation (but somehow able to read email...), or access/build Monodoc,
I've pasted the sample code from said documentation below...
static void Main ()
new ComboBoxSample ();
Window win = new Window ("ComboBoxSample");
win.DeleteEvent += new DeleteEventHandler (OnWinDelete);
ComboBox combo = ComboBox.NewText ();
for (int i = 0; i < 5; i ++)
combo.AppendText ("item " + i);
combo.Changed += new EventHandler (OnComboBoxChanged);
void OnComboBoxChanged (object o, EventArgs args)
ComboBox combo = o as ComboBox;
if (o == null)
if (combo.GetActiveIter (out iter))
Console.WriteLine ((string) combo.Model.GetValue (iter, 0));
void OnWinDelete (object obj, DeleteEventArgs args)
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list