16 protected override void OnLayout(LayoutEventArgs e)
19 if (viewpanel ==
null || statusPanel ==
null || trackBarPanel ==
null ||
20 hScrollBar ==
null || vScrollBar ==
null)
23 int top = showStatus ? statusPanel.Bottom : 0;
24 int bottom = showControls ? trackBarPanel.Top : ClientSize.Height;
26 int width = Math.Max(0, ClientSize.Width - (pyramidal ? vScrollBar.Width : 0));
27 int height = Math.Max(0, bottom - top - (pyramidal ? hScrollBar.Height : 0));
28 viewpanel.Bounds =
new System.Drawing.Rectangle(0, top, width, height);
29 hScrollBar.SetBounds(0, top + height, width, hScrollBar.Height);
30 vScrollBar.SetBounds(width, top, vScrollBar.Width, height);