gtk-sharp 2.12.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Gtk.HBox System.Obsolete A text entry field with a dropdown list

The widget consists of a single-line text entry field and a drop-down list. The drop-down list is displayed when the user clicks on a small arrow button to the right of the entry field.

The drop-down list is a widget and can be accessed using the list member of the . List elements can contain arbitrary widgets, but if an element is not a plain label, then you must use the function. This sets the string which will be placed in the text entry field when the item is selected.

By default, the user can step through the items in the list using the arrow (cursor) keys, though this behaviour can be turned off with = .

Creating a widget with simple text items:

`using System; using Gtk; class ComboSample { Combo combo; static void Main () { new ComboSample (); } ComboSample () { Application.Init (); Window win = new Window ("ComboSample"); win.DeleteEvent += new DeleteEventHandler (OnWinDelete); string[] list = new string[] {"one", "two", "three"}; combo = new Combo (); combo.PopdownStrings = list; combo.DisableActivate (); combo.Entry.Activated += new EventHandler (OnEntryActivated); win.Add (combo); win.ShowAll (); Application.Run (); } void OnEntryActivated (object o, EventArgs args) { Console.WriteLine (combo.Entry.Text); } void OnWinDelete (object obj, DeleteEventArgs args) { Application.Quit (); } }`
- Constructor
  2.12.0.0
  Creates a new .
  This is the default contructor for
- Constructor
  2.12.0.0
  System.Obsolete
  a
  Protected constructor.
  Chain to this constructor if you have manually registered a native value for your subclass.
- Constructor
  2.12.0.0
  Pointer to the C object.
  Internal constructor

  This is an internal constructor, and should not be used by user code.

- Property
  2.12.0.0
  GLib.Property("allow-empty")
  System.Boolean Specifies if an empty field is acceptable. if an empty value is considered valid.
- Property
  2.12.0.0
  Gtk.Button The asociated with the . an object of type
- Property
  2.12.0.0
  GLib.Property("case-sensitive")
  System.Boolean Specifies whether the text entered into the field and the text in the list items is case sensitive. if the text in the list items is case sensitive. This may be useful, for example, when you have set true ValueInList to limit the values entered, but you are not worried about differences in case.
- Method
  2.12.0.0
  System.Void Disables showing the popup list on the activate event. Stops the widget from showing the popup list when the emits the event, i.e. when the Return key is pressed. This may be useful if, for example, you want the Return key to close a dialog instead.
- Property
  2.12.0.0
  GLib.Property("enable-arrow-keys")
  System.Boolean Specifies if the arrow (cursor) keys can be used to step through the items in the list. if the arrow keys can be used to step through the items in the list. This is by default.
- Property
  2.12.0.0
  GLib.Property("enable-arrows-always")
  System.Boolean See a
- Property
  2.12.0.0
  Gtk.Entry The asociated with the . an object of type
- Property
  2.12.0.0
  GLib.GType GType Property. a Returns the native value for .
- Property
  2.12.0.0
  Gtk.Widget To be added. To be added. To be added.
- Property
  2.12.0.0
  System.String[] Property to set all of the items in the popup list. An array of strings.
- Method
  2.12.0.0
  System.Void `` `` an object of type an object of type Sets the string to place in the field when a particular list item is selected. This is not needed if the list item is a simple .
- Method
  2.12.0.0
  System.Void `` `` a a Whether entered values must already be present in the list.
- Property
  2.12.0.0
  System.Boolean Specifies if the arrow (cursor) keys can be used to step through the items in the list. See also EnableArrowKeys. if the arrow keys can be used to step through the items in the list. This is on by default.
- Property
  2.12.0.0
  System.Boolean Does nothing. ---- REMOVE ---- See EnableArrowKeys. a
- Property
  2.12.0.0
  GLib.Property("value-in-list")
  System.Boolean Specifies whether the value entered in the text entry field must match one of the values in the list. if the value entered must match one of the values in the list. If this is set then the user will not be able to perform any other action until a valid value has been entered.