When overriding the OnPaint method of a custom control I'm supplied with a PaintEventArgs, which contains a Graphics object and a ClipRectangle. The ClipRectangle is too small for my tastes and so I want to either extend it by say, 100 pixels, or ignore it completely.
No matter what I do, I can't seem to break out of the ClipRectangle. So far I've tried:
e.ClipRectangle.Inflate(100, 0);
e.Graphics.ResetClip();
e.Graphics.SetClip(new Rectangle(x, y, w, h));
The parent control is calling Invalidate(true) (to force an invalidation of all the childs' child controls).
I've also done some googling and looked on bob powell's site but can't find nuffin.
ResetClip resets the clipping region for the Graphics object to an infinitely large Rectangle, but the Graphics object cheerfully continues to use the provided ClipRectangle.
Help.