GoRuler : Override OnPaintBackground not work

Hi i have problem with override OnPaintBackground of GoRuler, but the result was not work. I just want to draw background with Gradient Color.
Cound you please help me out..
public class GoRulerTop : GoRuler {
public GoRulerTop(): base() { }
protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs pevent) { base.OnPaintBackground(pevent); Graphics g = pevent.Graphics; Rectangle rect = pevent.ClipRectangle; LinearGradientBrush b = new LinearGradientBrush(rect, Color.White, Color.LightGray, 90, false); g.FillRectangle(b, rect); b.Dispose(); }

Doesn’t work at all, or doesn’t look right?

It would be useful to know what is wrong and what result you expected.

But I’ll guess that what you want to do is use a different Rectangle. Try using new Rectangle(0, 0, this.Width, this.Height).