diff options
author | Jackson Harper <jackson@novell.com> | 2006-02-28 02:42:10 +0300 |
---|---|---|
committer | Jackson Harper <jackson@novell.com> | 2006-02-28 02:42:10 +0300 |
commit | ba62056db0634deb22c521e89307459987beedb9 (patch) | |
tree | d6d2ec95ba1f3961cf3518eb1c8a89b470319b53 | |
parent | 9fb0a744993baf9732f235342f59c7ddda89e97e (diff) |
* MdiClient.cs: Add the sizegrip when both scrollbars are used.
svn path=/trunk/mcs/; revision=57362
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 1 | ||||
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs | 24 |
2 files changed, 21 insertions, 4 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 3c5e30262bf..304dceb8b6b 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -2,6 +2,7 @@ * SizeGrip.cs: Paint the background color before painting the grip so things look right. + * MdiClient.cs: Add the sizegrip when both scrollbars are used. 2006-02-27 Mike Kestner <mkestner@novell.com> diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs index 8c1b7e76895..9dd830b8e1a 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiClient.cs @@ -39,6 +39,7 @@ namespace System.Windows.Forms { private Form active; private HScrollBar hbar; private VScrollBar vbar; + private SizeGrip sizegrip; #endregion // Local Variables @@ -153,8 +154,6 @@ namespace System.Windows.Forms { internal void EnsureScrollBars (int right, int bottom) { - Console.WriteLine ("Ensuring scrollbars"); - int width = Width; int height = Height; @@ -213,8 +212,6 @@ namespace System.Windows.Forms { private void SizeScrollBars () { - Console.WriteLine ("sizing the scrollbars"); - bool hbar_required = false; bool vbar_required = false; @@ -287,6 +284,19 @@ namespace System.Windows.Forms { CalcVBar (bottom, hbar != null && hbar.Visible); } else if (vbar != null) vbar.Visible = false; + + if (need_hbar && need_vbar) { + if (sizegrip == null) { + sizegrip = new SizeGrip (); + Controls.AddImplicit (sizegrip); + } + sizegrip.Location = new Point (hbar.Right, vbar.Bottom); + sizegrip.Width = vbar.Width; + sizegrip.Height = hbar.Height; + sizegrip.Visible = true; + } else if (sizegrip != null) { + sizegrip.Visible = false; + } } private void CalcHBar (int right, bool vert_vis) @@ -324,6 +334,12 @@ namespace System.Windows.Forms { { form.BringToFront (); active = form; + + foreach (Form child in Controls) { + if (child == form) + continue; + // TODO: We need to repaint the decorations here + } } internal int ChildrenCreated { |