2003-02-12 02:00:12 +00:00
<Type Name= "Combo" FullName= "Gtk.Combo" >
2005-05-23 20:41:51 +00:00
<TypeSignature Language= "C#" Maintainer= "John Luke" Value= "public class Combo : Gtk.HBox" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2007-12-06 18:37:54 +00:00
<AssemblyVersion > 2.12.0.0</AssemblyVersion>
2003-02-12 02:00:12 +00:00
</AssemblyInfo>
2003-02-23 07:26:30 +00:00
<ThreadSafetyStatement > Gtk# is thread aware, but not thread safe; See the <link location= "node:gtk-sharp/programming/threads" > Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
2003-02-12 02:00:12 +00:00
<Docs >
2003-04-24 18:14:30 +00:00
<summary > A text entry field with a dropdown list</summary>
<remarks >
<para >
2003-07-27 23:31:49 +00:00
The <see cref= "T:Gtk.Combo" /> widget consists of a single-line text entry field and a
2003-04-24 18:14:30 +00:00
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.
</para>
<para >
2003-07-27 23:31:49 +00:00
The drop-down list is a <see cref= "T:Glib.List" /> widget and can be accessed using the
list member of the <see cref= "T:Gtk.Combo" /> . List elements can contain arbitrary
2003-04-24 18:14:30 +00:00
widgets, but if an element is not a plain label, then you must use
2003-07-27 23:31:49 +00:00
the <see cref= "M:Glib.List.SetItemString()" /> function. This sets the string which
2003-04-24 18:14:30 +00:00
will be placed in the text entry field when the item is selected.
</para>
<para >
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
2003-07-27 23:31:49 +00:00
<see cref= "P:Gtk.Combo.UseArrows" /> = <see langword= "false" /> .
2003-04-24 18:14:30 +00:00
</para>
<example >
<para >
2003-07-27 23:31:49 +00:00
Creating a <see cref= "T:Gtk.Combo" /> widget with simple text items:
2003-04-24 18:14:30 +00:00
</para>
<code lang= "c#" >
2003-07-27 23:31:49 +00:00
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);
2004-06-19 18:25:02 +00:00
string[] list = new string[] {"one", "two", "three"};
2003-07-27 23:31:49 +00:00
combo = new Combo ();
2004-06-19 18:25:02 +00:00
combo.PopdownStrings = list;
2003-07-27 23:31:49 +00:00
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 ();
}
}
2003-04-24 18:14:30 +00:00
</code>
</example>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
<Base >
<BaseTypeName > Gtk.HBox</BaseTypeName>
</Base>
2007-01-16 16:18:05 +00:00
<Interfaces >
</Interfaces>
2005-05-23 20:41:51 +00:00
<Attributes >
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > System.Obsolete</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
</Attributes>
2003-02-12 02:00:12 +00:00
<Members >
<Member MemberName= "SetItemString" >
<MemberSignature Language= "C#" Value= "public void SetItemString (Gtk.Item item, string item_value);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
2003-07-27 23:31:49 +00:00
<Parameter Name= "item" Type= "Gtk.Item" />
<Parameter Name= "item_value" Type= "System.String" />
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-27 23:31:49 +00:00
<summary > Sets the string to place in the <see cref= "T:Gtk.Entry" /> field when a particular list item is selected.</summary>
<param name= "item" > an object of type <see cref= "T:Gtk.Item" /> </param>
<param name= "item_value" > an object of type <see cref= "T:System.String" /> </param>
<remarks > This is not needed if the list item is a simple <see cref= "T:Gtk.Label" /> .</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "DisableActivate" >
<MemberSignature Language= "C#" Value= "public void DisableActivate ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-07-27 23:31:49 +00:00
<summary > Disables showing the popup list on the activate event.</summary>
<remarks > Stops the <see cref= "T:Gtk.Combo" /> widget from showing the popup list when the <see cref= "T:Gtk.Entry" /> emits the <see cref= "E:Gtk.Entry.Activate" /> 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.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Combo (IntPtr raw);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-07-27 23:31:49 +00:00
<Parameter Name= "raw" Type= "System.IntPtr" />
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-02-23 07:26:30 +00:00
<summary > Internal constructor</summary>
<param name= "raw" > Pointer to the C object.</param>
<remarks >
<para > This is an internal constructor, and should not be used by user code.</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Combo ();" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs >
2003-07-27 23:31:49 +00:00
<summary > Creates a new <see cref= "T:Gtk.Combo" /> .</summary>
<remarks > This is the default contructor for <see cref= "T:Gtk.Combo" /> </remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Button" >
<MemberSignature Language= "C#" Value= "public Gtk.Button Button { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.Button</ReturnType>
</ReturnValue>
<Docs >
2003-07-27 23:31:49 +00:00
<summary > The <see cref= "T:Gtk.Button" /> asociated with the <see cref= "T:Gtk.Combo" /> .</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:Gtk.Button" /> </value>
2003-12-24 01:35:30 +00:00
<remarks >
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Entry" >
<MemberSignature Language= "C#" Value= "public Gtk.Entry Entry { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.Entry</ReturnType>
</ReturnValue>
<Docs >
2003-07-27 23:31:49 +00:00
<summary > The <see cref= "T:Gtk.Entry" /> asociated with the <see cref= "T:Gtk.Combo" /> .</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:Gtk.Entry" /> </value>
2003-12-24 01:35:30 +00:00
<remarks >
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "UseArrowsAlways" >
<MemberSignature Language= "C#" Value= "public bool UseArrowsAlways { set; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2004-06-27 14:47:17 +00:00
<summary > Does nothing. ---- REMOVE ---- See EnableArrowKeys.</summary>
2005-05-23 20:41:51 +00:00
<value > a <see cref= "T:System.Boolean" /> </value>
2004-11-05 21:25:40 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "UseArrows" >
<MemberSignature Language= "C#" Value= "public bool UseArrows { set; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2004-06-27 14:47:17 +00:00
<summary > Specifies if the arrow (cursor) keys can be used to step through the items in the list. See also EnableArrowKeys.</summary>
2005-05-23 20:41:51 +00:00
<value >
<see langword= "true" /> if the arrow keys can be used to step through the items in the list.</value>
2003-04-24 18:14:30 +00:00
<remarks > This is on by default.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "EnableArrowsAlways" >
<MemberSignature Language= "C#" Value= "public bool EnableArrowsAlways { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2004-11-05 21:25:40 +00:00
<summary > See <see cref= "P:Gtk.Combo.EnableArrowKeys" /> </summary>
2005-05-23 20:41:51 +00:00
<value > a <see cref= "T:System.Boolean" /> </value>
2004-11-05 21:25:40 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("enable-arrows-always")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "ValueInList" >
<MemberSignature Language= "C#" Value= "public bool ValueInList { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-27 23:31:49 +00:00
<summary > Specifies whether the value entered in the text entry field must match one of the values in the list.</summary>
2005-05-23 20:41:51 +00:00
<value >
<see langword= "true" /> if the value entered must match one of the values in the list.</value>
2003-07-27 23:31:49 +00:00
<remarks > If this is set then the user will not be able to perform any other action until a valid value has been entered.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("value-in-list")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "AllowEmpty" >
<MemberSignature Language= "C#" Value= "public bool AllowEmpty { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-04-24 18:14:30 +00:00
<summary > Specifies if an empty field is acceptable.</summary>
2005-05-23 20:41:51 +00:00
<value >
<see langword= "true" /> if an empty value is considered valid.</value>
2004-11-05 21:25:40 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("allow-empty")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "EnableArrowKeys" >
<MemberSignature Language= "C#" Value= "public bool EnableArrowKeys { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-27 23:31:49 +00:00
<summary > Specifies if the arrow (cursor) keys can be used to step through the items in the list.</summary>
2005-05-23 20:41:51 +00:00
<value >
<see langword= "true" /> if the arrow keys can be used to step through the items in the list.</value>
2003-07-27 23:31:49 +00:00
<remarks > This is <see langword= "true" /> by default.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("enable-arrow-keys")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "CaseSensitive" >
<MemberSignature Language= "C#" Value= "public bool CaseSensitive { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-27 23:31:49 +00:00
<summary > Specifies whether the text entered into the <see cref= "T:Gtk.Entry" /> field and the text in the list items is case sensitive.</summary>
2005-05-23 20:41:51 +00:00
<value >
<see langword= "true" /> if the text in the list items is case sensitive.</value>
2003-04-24 18:14:30 +00:00
<remarks > 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.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("case-sensitive")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-12-24 01:35:30 +00:00
<Member MemberName= "GType" >
<MemberSignature Language= "C#" Value= "public static GLib.GType GType { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > GLib.GType</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-21 20:14:42 +00:00
<summary > GType Property.</summary>
2005-05-23 20:41:51 +00:00
<value > a <see cref= "T:GLib.GType" /> </value>
2004-06-21 20:14:42 +00:00
<remarks > Returns the native <see cref= "T:GLib.GType" /> value for <see cref= "T:Gtk.Combo" /> .</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
2003-03-07 01:30:00 +00:00
<Member MemberName= ".ctor" >
2003-12-24 01:35:30 +00:00
<MemberSignature Language= "C#" Value= "protected Combo (GLib.GType gtype);" />
2003-03-07 01:30:00 +00:00
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-12-24 01:35:30 +00:00
<Parameter Name= "gtype" Type= "GLib.GType" />
2003-07-27 23:31:49 +00:00
</Parameters>
2003-03-07 01:30:00 +00:00
<Docs >
2005-01-02 23:55:33 +00:00
<summary > Protected constructor.</summary>
2003-12-24 01:35:30 +00:00
<param name= "gtype" > a <see cref= "T:GLib.GType" /> </param>
2004-06-21 20:33:11 +00:00
<remarks > Chain to this constructor if you have manually registered a native <see cref= "T:GLib.GType" /> value for your subclass.</remarks>
2003-03-07 01:30:00 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > System.Obsolete</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2004-02-26 18:46:28 +00:00
<Member MemberName= "PopdownStrings" >
2005-05-23 20:41:51 +00:00
<MemberSignature Language= "C#" Value= "public string[] PopdownStrings { set; };" />
2004-02-26 18:46:28 +00:00
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.String[]</ReturnType>
</ReturnValue>
<Docs >
2004-03-05 13:40:13 +00:00
<summary > Property to set all of the items in the popup list.</summary>
2005-05-23 20:41:51 +00:00
<value > An array of strings.</value>
2004-03-05 13:40:13 +00:00
<remarks />
2004-02-26 18:46:28 +00:00
</Docs>
</Member>
2004-12-17 17:55:07 +00:00
<Member MemberName= "SetValueInList" >
<MemberSignature Language= "C#" Value= "public void SetValueInList (bool val, bool ok_if_empty);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "val" Type= "System.Boolean" />
<Parameter Name= "ok_if_empty" Type= "System.Boolean" />
</Parameters>
<Docs >
2005-01-02 23:55:33 +00:00
<summary > Whether entered values must already be present in the list.</summary>
2004-12-17 17:55:07 +00:00
<param name= "val" > a <see cref= "T:System.Boolean" /> </param>
<param name= "ok_if_empty" > a <see cref= "T:System.Boolean" /> </param>
2005-05-23 20:41:51 +00:00
<remarks >
</remarks>
2004-12-17 17:55:07 +00:00
</Docs>
</Member>
2005-08-23 17:02:47 +00:00
<Member MemberName= "List" >
2005-07-08 22:04:50 +00:00
<MemberSignature Language= "C#" Value= "public Gtk.Widget List { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.Widget</ReturnType>
</ReturnValue>
<Docs >
<summary > To be added.</summary>
<value > To be added.</value>
<remarks > To be added.</remarks>
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2005-01-02 23:55:33 +00:00
</Type>