gtk-sharp 2.12.0.0 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 System.Obsolete Method System.Void Removes the menu from the . Constructor Internal constructor Pointer to the C object. This is an internal constructor, and should not be used by user code. Constructor Creates a new 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 GLib.Property("menu") Event System.EventHandler Emitted when the selection is changed. GLib.Signal("changed") Method System.Void Selects the menu item specified by making it the newly selected value for the . a Property GLib.GType GType Property. a Returns the native value for . Method System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event. Constructor Protected Constructor. a Chain to this constructor if you have manually registered a native value for your subclass. System.Obsolete