Most controls seem to be painted by overriding the WndProc method and doing
something as follows:
protected override void WndProc (ref Message m)
{
switch ((Msg) m.Msg) {
case Msg.WM_PAINT:
PaintEventArgs paint_event;
paint_event = XplatUI.PaintEventStart (Handle);
PaintInternal (paint_event);
XplatUI.PaintEventEnd (Handle);
break;
default:
base.WndProc (ref m);
break;
}
}
This is what I am currently doing in the propertygrid as well. However,
under the Guidlines for SWF, it says to override the OnPaint event and draw the
image buffer (which was updated previously I assume):
protected override void OnPaint (PaintEventArgs pevent) {
pevent.Graphics.DrawImage (this.ImageBuffer,
pevent.ClipRectangle,
pevent.ClipRectangle,
GraphicsUnit.Pixel);
}
So, which drawing method is correct (or both or neither for that matter)?
Thanks,
Jonathan
_______________________________________________
Mono-winforms-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list