Author: jpobst
Date: 2007-03-30 09:19:08 -0500 (Fri, 30 Mar 2007)
New Revision: 75197
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UserControl.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UserControlTest.cs
Log:
2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
* UserControl.cs: Override CreateParams.
2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
* UserControlTest.cs: Add test for CreateParams.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-30 13:39:15 UTC (rev 75196)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-30 14:19:08 UTC (rev 75197)
@@ -1,3 +1,7 @@
+2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * UserControl.cs: Override CreateParams.
+
2007-03-30 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* Form.cs: Don't layout mdi children on MdiParent creation, the initial
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UserControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UserControl.cs
2007-03-30 13:39:15 UTC (rev 75196)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UserControl.cs
2007-03-30 14:19:08 UTC (rev 75197)
@@ -98,6 +98,18 @@
}
#endregion // Protected Instance Methods
+ #region Protected Properties
+#if NET_2_0
+ protected override CreateParams CreateParams {
+ get {
+ CreateParams cp = base.CreateParams;
+ cp.Style |= (int)WindowStyles.WS_TABSTOP;
+ cp.ExStyle |=
(int)WindowExStyles.WS_EX_CONTROLPARENT;
+ return cp;
+ }
+ }
+#endif
+ #endregion
#region Events
static object LoadEvent = new object ();
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-03-30 13:39:15 UTC (rev 75196)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-03-30 14:19:08 UTC (rev 75197)
@@ -1,3 +1,7 @@
+2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * UserControlTest.cs: Add test for CreateParams.
+
2007-03-30 Gert Driesen <[EMAIL PROTECTED]>
* FormHandleTest.cs: Added test for bug #81272.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UserControlTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UserControlTest.cs
2007-03-30 13:39:15 UTC (rev 75196)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UserControlTest.cs
2007-03-30 14:19:08 UTC (rev 75197)
@@ -70,6 +70,21 @@
{
uc.BorderStyle = (BorderStyle) 9999;
}
+
+ [Test]
+ public void MethodCreateParams ()
+ {
+ ExposeProtectedProperties uc = new
ExposeProtectedProperties ();
+
+ Assert.AreEqual (WindowStyles.WS_TILED |
WindowStyles.WS_MAXIMIZEBOX | WindowStyles.WS_CLIPCHILDREN |
WindowStyles.WS_CLIPSIBLINGS | WindowStyles.WS_VISIBLE | WindowStyles.WS_CHILD,
(WindowStyles)uc.CreateParams.Style, "D1");
+ Assert.AreEqual (WindowExStyles.WS_EX_CONTROLPARENT,
(WindowExStyles)uc.CreateParams.ExStyle, "D2");
+ }
+
+ private class ExposeProtectedProperties : UserControl
+ {
+ public new CreateParams CreateParams { get { return
base.CreateParams; } }
+ }
+
#endif
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches