[Mono-bugs] [Bug 420673] ToolStripComboBox.TextChanged Event not raised
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Aug 27 09:14:23 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=420673
User surfzoid2002 at yahoo.fr added comment
https://bugzilla.novell.com/show_bug.cgi?id=420673#c1
--- Comment #1 from Eric Petit <surfzoid2002 at yahoo.fr> 2008-08-27 07:14:23 MDT ---
I made a Svn up now, my machine took very long time to compil and durring this
time i have made the folowing patch (this is my first one) is it correct and
enought :
[root at SurfzoidPC System.Windows.Forms]# svn di ToolStripComboBox.cs
Index: ToolStripComboBox.cs
===================================================================
--- ToolStripComboBox.cs (révision 111697)
+++ ToolStripComboBox.cs (copie de travail)
@@ -307,6 +307,13 @@
eh (this, e);
}
+ protected virtual void OnTextChanged (EventArgs e)
+ {
+ EventHandler eh = (EventHandler)(Events
[TextChangedEvent]);
+ if (eh != null)
+ eh (this, e);
+ }
+
protected virtual void OnSelectionChangeCommitted (EventArgs e)
{
}
@@ -319,6 +326,7 @@
this.ComboBox.DropDownClosed += new
EventHandler(HandleDropDownClosed);
this.ComboBox.DropDownStyleChanged += new EventHandler
(HandleDropDownStyleChanged);
this.ComboBox.SelectedIndexChanged += new EventHandler
(HandleSelectedIndexChanged);
+ this.ComboBox.TextChanged += new EventHandler
(HandleTextChanged);
this.ComboBox.TextUpdate += new
EventHandler(HandleTextUpdate);
}
@@ -340,6 +348,7 @@
static object DropDownClosedEvent = new object ();
static object DropDownStyleChangedEvent = new object ();
static object SelectedIndexChangedEvent = new object ();
+ static object TextChangedEvent = new object ();
static object TextUpdateEvent = new object ();
[Browsable (false)]
@@ -369,6 +378,11 @@
remove { Events.RemoveHandler
(SelectedIndexChangedEvent, value); }
}
+ public event EventHandler TextChanged {
+ add { Events.AddHandler (TextChangedEvent, value); }
+ remove { Events.RemoveHandler (TextChangedEvent,
value); }
+ }
+
public event EventHandler TextUpdate {
add { Events.AddHandler (TextUpdateEvent, value); }
remove { Events.RemoveHandler (TextUpdateEvent, value);
}
@@ -395,6 +409,11 @@
{
OnSelectedIndexChanged (e);
}
+
+ private void HandleTextChanged (object sender, EventArgs e)
+ {
+ OnTextChanged (e);
+ }
private void HandleTextUpdate (object sender, EventArgs e)
{
[root at SurfzoidPC System.Windows.Forms]#
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list