Author: jpobst
Date: 2007-01-11 01:10:38 -0500 (Thu, 11 Jan 2007)
New Revision: 70833
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
Log:
2007-01-11 Jonathan Pobst <[EMAIL PROTECTED]>
* Button.cs: When clicked and setting the parent form's DialogResult,
use FindForm instead of Parent, since parent could be a container
control and not the Form. Fixes bug #80495.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs
2007-01-11 03:46:11 UTC (rev 70832)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs
2007-01-11 06:10:38 UTC (rev 70833)
@@ -94,7 +94,7 @@
#region Protected Instance Methods
protected override void OnClick(EventArgs e) {
if (dialog_result != DialogResult.None) {
- Form p = Parent as Form;
+ Form p = FindForm ();
if (p != null) {
p.DialogResult = dialog_result;
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-11 03:46:11 UTC (rev 70832)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-01-11 06:10:38 UTC (rev 70833)
@@ -1,3 +1,9 @@
+2007-01-11 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * Button.cs: When clicked and setting the parent form's DialogResult,
+ use FindForm instead of Parent, since parent could be a container
+ control and not the Form. Fixes bug #80495.
+
2007-01-10 Chris Toshok <[EMAIL PROTECTED]>
* Form.cs: move the call to SendControlFocus into the same
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches