Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2011-11-11 15:37:34 +0400
committerLluis Sanchez <lluis@xamarin.com>2011-11-11 15:37:34 +0400
commit5e9265c85ab3440ab064bb70d8ca3437dae302b2 (patch)
tree4ec73247a9ff9af3eb4a5c1afce37e3bc1aecba2 /Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs
parent1ee01d41c1f9e908edcd628f96d57e575dc86833 (diff)
Add selection changed event and removed some debug code
Diffstat (limited to 'Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs')
-rw-r--r--Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs
index 97632fa0..e89f0304 100644
--- a/Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/ComboBoxBackend.cs
@@ -51,6 +51,29 @@ namespace Xwt.GtkBackend
protected new IComboBoxEventSink EventSink {
get { return (IComboBoxEventSink)base.EventSink; }
}
+
+ public override void EnableEvent (object eventId)
+ {
+ base.EnableEvent (eventId);
+ if (eventId is ComboBoxEvent) {
+ if ((ComboBoxEvent)eventId == ComboBoxEvent.SelectionChanged)
+ Widget.Changed += HandleChanged;
+ }
+ }
+
+ public override void DisableEvent (object eventId)
+ {
+ base.DisableEvent (eventId);
+ if (eventId is ComboBoxEvent) {
+ if ((ComboBoxEvent)eventId == ComboBoxEvent.SelectionChanged)
+ Widget.Changed -= HandleChanged;
+ }
+ }
+
+ void HandleChanged (object sender, EventArgs e)
+ {
+ EventSink.OnSelectionChanged ();
+ }
#region IComboBoxBackend implementation
public void SetViews (CellViewCollection views)