From fc8bc091a5f02120cab4ad2072200bb86c9949b8 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Sat, 19 Nov 2005 03:37:19 +0000 Subject: [PATCH] * Control.cs: Put the enum check back in now that MDI doesnt have to use this to set border styles. * Form.cs: Only set mdi child windows borders if the handle has been created. * MdiChildContext.cs: Don't set the InternalBorderStyle, just pass this directly on to the driver. svn path=/trunk/mcs/; revision=53262 --- .../Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 9 +++++++++ .../System.Windows.Forms/Control.cs | 2 -- .../Managed.Windows.Forms/System.Windows.Forms/Form.cs | 5 ++--- .../System.Windows.Forms/MdiChildContext.cs | 5 ----- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index fae7a93ade3..c586b1aa7f5 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,12 @@ +2005-11-18 Jackson Harper + + * Control.cs: Put the enum check back in now that MDI doesnt have + to use this to set border styles. + * Form.cs: Only set mdi child windows borders if the handle has + been created. + * MdiChildContext.cs: Don't set the InternalBorderStyle, just pass + this directly on to the driver. + 2005-11-18 Jackson Harper * XplatUIX11.cs: Just compute the mdi borders separately as they diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs index a5415c8f973..f146b50b578 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs @@ -741,10 +741,8 @@ namespace System.Windows.Forms } set { - /* if (!Enum.IsDefined (typeof (BorderStyle), value)) throw new InvalidEnumArgumentException (string.Format("Enum argument value '{0}' is not valid for BorderStyle", value)); - */ if (border_style != value) { border_style = value; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs index 3f6ad8704d4..6d0fa2fbba4 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs @@ -331,7 +331,7 @@ namespace System.Windows.Forms { } UpdateStyles(); } else { - if (mdi_child_context != null) + if (mdi_child_context != null && IsHandleCreated) mdi_child_context.UpdateBorderStyle (value); UpdateStyles (); } @@ -800,8 +800,7 @@ namespace System.Windows.Forms { } } else { - - + switch (FormBorderStyle) { case FormBorderStyle.Fixed3D: { diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiChildContext.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiChildContext.cs index 399fdaf0ab8..7cfe1dd0b80 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiChildContext.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiChildContext.cs @@ -62,11 +62,6 @@ namespace System.Windows.Forms { this.form = form; this.mdi_container = mdi_container; - if (form.FormBorderStyle != FormBorderStyle.None) - form.InternalBorderStyle = (BorderStyle) MdiBorderStyle; - else - form.InternalBorderStyle = BorderStyle.None; - /* minimize_button = new Button (); minimize_button.Bounds = new Rectangle (form.Width - 62, -- 2.25.1