[Mono-bugs] [Bug 78773][Nor] Changed - TextBoxBase: TextChanged event isn't fired when it's set by first time and gets a String.Empty value

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jul 6 05:52:07 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by unserkonig at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=78773

--- shadow/78773	2006-07-06 05:48:52.000000000 -0400
+++ shadow/78773.tmp.21297	2006-07-06 05:52:07.000000000 -0400
@@ -34,6 +34,17 @@
 print "TEXT CHANGED to" (text changed to an empty string, basically),
 but nothing is printed in Mono.
 
 Observe that "TEXT CHANGED to" is printed to the console in .Net when
 the "Clear" button is clicked, thus showing that TextChanged event is
 fired correctly.
+
+------- Additional Comments From unserkonig at gmail.com  2006-07-06 05:52 -------
+The problem is that TextBoxBase.Text property invokes the base
+implementation (Control.Text), and the event isn't fired if the
+previous value and the current one are the same. But Control.Text
+doesn't contains the text currently in the graphical text box until
+TextBoxBase.Text setter is called for the first time, and thus it has
+a String.Empty value. So, if the first value that Control.Text gets
+(invoked from TextBoxBase) is a String.Empty value, then the
+TextChanged event isn't fired, because both the previous value and the
+current one (Control.Text=String.Empty) are the same.


More information about the mono-bugs mailing list