gtk-sharp 0.0.0.0 neutral Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. A widget used to choose from a list of valid choices. A is a widget that allows the user to choose from a list of valid choices. The displays the selected choice. When activated the displays a popup which allows the user to make a new choice. Using a is simple; build a , by calling , then appending s to it with . Set that menu on the with . Set the selected with ; connect to the event ; when the event occurs, check the new selected with . using System; using Gtk; class OptionMenuSample { OptionMenu opt; static void Main () { new OptionMenuSample (); } OptionMenuSample () { Application.Init (); Window win = new Window ("OptionMenuSample"); win.DeleteEvent += new DeleteEventHandler (OnWinDelete); // set up the OptionMenu opt = new OptionMenu (); opt.Changed += new EventHandler (OnOptionChanged); Menu m = new Menu (); MenuItem miOne = new MenuItem ("One"); m.Append (miOne); MenuItem miTwo = new MenuItem ("Two"); m.Append (miTwo); MenuItem miThree = new MenuItem ("Three"); m.Append (miThree); // add children widgets to their parents opt.Menu = m; win.Add (opt); // set the OptionMenu to a value opt.SetHistory (2); win.ShowAll (); Application.Run (); } void OnOptionChanged (object o, EventArgs args) { Console.WriteLine (opt.History); } void OnWinDelete (object o, DeleteEventArgs args) { Application.Quit (); } } Gtk.Button Atk.Implementor GLib.IWrapper GLib.IWrapper System.IDisposable Method System.Void Removes the menu from the . Method System.Void Disposes the resources associated with the object. Constructor Internal constructor Pointer to the C object. An instance of , wrapping the C object. This is an internal constructor, and should not be used by user code. Constructor Creates a new an object of type This is the default constructor for Property System.Int32 Retrieves the index of the currently selected . an object of type The s are numbered from top to bottom, starting with 0. Property Gtk.Widget The menu of options. an object of type an object of type Event System.EventHandler Emitted when the selection is changed. Method System.Void Selects the menu item specified by making it the newly selected value for the . a Property GLib.GType To be added a To be added Method System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event. Constructor To be added a a To be added