I found this on a french site, not quite what you want but close.
/* CODE */
using System;
using System.Drawing;
using System.Windows.Forms;
public class QuatresPanelsDeuxSplitters : Form
{
private Splitter splitter1;
private Splitter splitter2;
private Panel panel1;
private Panel panel2;
private Panel panel3;
private Panel panel4;
TextBox rtb1;
TextBox rtb2;
TextBox rtb3;
public QuatresPanelsDeuxSplitters()
{
InitializeComponent();
}
private void InitializeComponent()
{
this.splitter1 = new Splitter();
this.splitter2 = new Splitter();
this.panel1 = new Panel();
this.panel2 = new Panel();
this.panel3 = new Panel();
this.panel4 = new Panel();
this.rtb1 = new TextBox();
this.rtb2 = new TextBox();
this.rtb3 = new TextBox();
this.SuspendLayout();
//
// panel1 (en fill)
//
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Resize += new EventHandler(PanelOnResize);
this.panel1.Paint += new PaintEventHandler(PanelOnPaint);
//
// splitter1 (en haut)
//
this.splitter1.Dock = System.Windows.Forms.DockStyle.Top;
//
// panel2 (en haut)
//
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Resize += new EventHandler(PanelOnResize);
this.panel2.Paint += new PaintEventHandler(PanelOnPaint);
//
// panel3 (fill sur panel1)
//
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Resize += new EventHandler(PanelOnResize);
this.panel3.Paint += new PaintEventHandler(PanelOnPaint);
this.panel3.Parent = this.panel1;
//
// splitter2 (a droite de panel3 sur panel1)
//
this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
this.splitter2.Parent = this.panel1;
//
// panel4 (a droite de splitter 2 sur panel1)
//
this.panel4.Dock = System.Windows.Forms.DockStyle.Right;
this.panel4.Resize += new EventHandler(PanelOnResize);
this.panel4.Paint += new PaintEventHandler(PanelOnPaint);
this.panel4.Parent = this.panel1;
//
// rtb1
//
this.rtb1.Multiline = true;
this.rtb1.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtb1.Parent = this.panel2;
//
// rtb2
//
this.rtb2.Multiline = true;
this.rtb2.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtb2.Parent = this.panel3;
//
// rtb3
//
this.rtb3.Multiline = true;
this.rtb3.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtb3.Parent = this.panel4;
//
// Fenêtre UnPanelUnSplitter
//
this.ClientSize = new System.Drawing.Size(319, 322);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.panel1,
this.splitter1,
this.panel2});
this.Text = "Quatres panels avec deux splitters";
this.ResumeLayout(false);
this.Resize += new EventHandler(PanelOnResize);
this.Paint += new PaintEventHandler(PanelOnPaint);
}
static void Main()
{
Application.Run(new QuatresPanelsDeuxSplitters());
}
void PanelOnResize(object o, EventArgs e)
{
Control control = (Control)o;
control.Invalidate();
}
void PanelOnPaint(object o, PaintEventArgs args)
{
Control panel = (Control)o;
Graphics grfx = args.Graphics;
grfx.DrawLine(Pens.Black, 0, 0, panel.Width-1, panel.Height-1);
grfx.DrawLine(Pens.Black, panel.Width-1, 0, 0, panel.Height-1);
grfx.DrawEllipse(Pens.Black, 0, 0, panel.Width-1, panel.Height-1);
}
}
/* END of CODE */
Hope this helps
Publicjoe
C# Tutorial at
http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Snippets at
http://www.publicjoe.f9.co.uk/csharp/snip/snippets.html
C# Ebook at
http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html