Author: jackson
Date: 2005-09-28 01:51:10 -0400 (Wed, 28 Sep 2005)
New Revision: 50928
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
Log:
* Form.cs: Set the position of new mdi children correctly.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-09-28 05:48:13 UTC (rev 50927)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-09-28 05:51:10 UTC (rev 50928)
@@ -1,5 +1,9 @@
2005-09-27 Jackson Harper <[EMAIL PROTECTED]>
+ * Form.cs: Set the position of new mdi children correctly.
+
+2005-09-27 Jackson Harper <[EMAIL PROTECTED]>
+
* MdiClient.cs: New mdi children need to be added to the back of
the controls collection so the zorder is set correctly. Also add a
count of all the child windows that have been created.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
2005-09-28 05:48:13 UTC (rev 50927)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
2005-09-28 05:51:10 UTC (rev 50928)
@@ -747,9 +747,9 @@
cp.Height = Height;
if (IsMdiChild) {
- cp.Style |= (int)WindowStyles.WS_CHILD;
- cp.Style |=
(int)WindowStyles.WS_CLIPCHILDREN;
- cp.Style |=
(int)WindowStyles.WS_CLIPSIBLINGS;
+ cp.Style |= (int)WindowStyles.WS_CHILD |
+ (int)WindowStyles.WS_CLIPCHILDREN |
+ (int)WindowStyles.WS_CLIPSIBLINGS;
cp.Parent = Parent.Handle;
} else {
cp.Style |=
(int)WindowStyles.WS_CAPTION;
@@ -1084,16 +1084,21 @@
this.is_visible = visible;
}
- switch (StartPosition) {
+ if (!IsMdiChild) {
+ switch (StartPosition) {
case FormStartPosition.CenterScreen:
this.CenterToScreen();
break;
case FormStartPosition.CenterParent:
this.CenterToParent ();
break;
+ }
+ } else {
+ Left = 25 *
MdiParent.MdiContainer.ChildrenCreated + 1;
+ Top = 25 *
MdiParent.MdiContainer.ChildrenCreated + 1;
+ MdiParent.MdiContainer.ChildrenCreated++;
}
-
if (menu != null) {
XplatUI.SetMenu(window.Handle, menu.Handle);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches