+2007-01-29 Jonathan Pobst <monkey@jpobst.com>
+
+ * DefaultLayout.cs: MdiClient should always be added last, it should
+ never Dock:Fill under other controls. [Fixes a part of bug #80223]
+
2007-01-20 Jonathan Pobst <monkey@jpobst.com>
* DefaultLayout.cs: Remove special loop for Dock.Fill and handle
void LayoutDockedChildren (Control parent, Control[] controls)
{
Rectangle space = parent.DisplayRectangle;
-
+ MdiClient mdi = null;
+
// Deal with docking; go through in reverse, MS docs say that lowest Z-order is closest to edge
for (int i = controls.Length - 1; i >= 0; i--) {
Control child = controls[i];
|| child.ControlLayoutType == Control.LayoutType.Anchor)
continue;
+ // MdiClient never fills the whole area like other controls, have to do it later
+ if (child is MdiClient) {
+ mdi = (MdiClient)child;
+ continue;
+ }
+
switch (child.Dock) {
case DockStyle.None:
// Do nothing
break;
}
}
+
+ // MdiClient gets whatever space is left
+ if (mdi != null)
+ mdi.SetImplicitBounds (space.Left, space.Top, space.Width, space.Height);
}
void LayoutAnchoredChildren (Control parent, Control[] controls)