SplitContainer, visible handle for resizing

Hi

Using the SplitContainer.
Is there a way to make a visible handle, to click and drag, when resizing the panels in the SplitContainer.
I would like to make it obvious and easy to see for the user, where to click when resizing the panels.

//regards
//lasse

[275 byte] By [LasseL] at [2007-12-16]
# 1

Lasse,

It isn't too hard to do this, simply derive from SplitContainer and override the OnPaint method.
The following draws a visible grab handle for the SplitContainer.


using System;
using System.Windows.Forms;

namespace System.Windows.Forms
{
public class SplitContainerEx : SplitContainer
{
protected override void OnPaint(PaintEventArgs e)
{

base.OnPaint(e);

ControlPaint.DrawGrabHandle(e.Graphics, SplitterRectangle, false, Enabled);

}
}
}


DavidM.Kean at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...