* gtk/ComboBoxEntry.custom: add an "Entry" property to cleanly
fetch the ComboBoxEntry's Gtk.Entry svn path=/trunk/gtk-sharp/; revision=47750
This commit is contained in:
parent
0fa85fccbd
commit
45ebde9387
5 changed files with 35 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-07-27 Dan Winship <danw@novell.com>
|
||||
|
||||
* gtk/ComboBoxEntry.custom: add an "Entry" property to cleanly
|
||||
fetch the ComboBoxEntry's Gtk.Entry
|
||||
|
||||
2005-07-27 Dan Winship <danw@novell.com>
|
||||
|
||||
* parser/gapi2xml.pl (addParamsElem): deal with G_CONST_RETURN in
|
||||
|
|
|
@ -129,5 +129,17 @@
|
|||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Entry">
|
||||
<MemberSignature Language="C#" Value="public Gtk.Entry Entry { get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Gtk.Entry</ReturnType>
|
||||
</ReturnValue>
|
||||
<Docs>
|
||||
<summary>The combo box's <see cref="T:Gtk.Entry" /> child.</summary>
|
||||
<value>The <see cref="T:Gtk.Entry" />.</value>
|
||||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
|
|
|
@ -24,3 +24,8 @@
|
|||
AppendText (entry);
|
||||
}
|
||||
|
||||
public Gtk.Entry Entry {
|
||||
get {
|
||||
return (Gtk.Entry)Child;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2005-07-27 Dan Winship <danw@novell.com>
|
||||
|
||||
* TestComboBox.cs: test ComboBoxEntry.Entry
|
||||
|
||||
2004-05-31 Jeroen Zwartepoorte <jeroen@xs4all.nl>
|
||||
|
||||
reviewed by: <delete if not using a buddy>
|
||||
|
|
|
@ -27,6 +27,7 @@ namespace WidgetViewer {
|
|||
|
||||
ComboBoxEntry combo = new Gtk.ComboBoxEntry (new string[] {"Foo", "Bar"});
|
||||
combo.Changed += new EventHandler (OnComboActivated);
|
||||
combo.Entry.Changed += new EventHandler (OnComboEntryChanged);
|
||||
box2.PackStart (combo, true, true, 0);
|
||||
|
||||
HSeparator separator = new HSeparator ();
|
||||
|
@ -55,8 +56,14 @@ namespace WidgetViewer {
|
|||
{
|
||||
ComboBox combo = o as ComboBox;
|
||||
TreeIter iter;
|
||||
combo.GetActiveIter (out iter);
|
||||
Console.WriteLine ((string)combo.Model.GetValue (iter, 0));
|
||||
if (combo.GetActiveIter (out iter))
|
||||
Console.WriteLine ((string)combo.Model.GetValue (iter, 0));
|
||||
}
|
||||
|
||||
static void OnComboEntryChanged (object o, EventArgs args)
|
||||
{
|
||||
Entry entry = o as Entry;
|
||||
Console.WriteLine ("Entry text is: " + entry.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue