[Mono-winforms-list] System.Windows.Forms.Form:
PaintEventHandler is called only when you increase the form
Jackson Harper
jackson at ximian.com
Tue Nov 1 15:23:21 EST 2005
On Tue, 2005-11-01 at 21:13 +0100, Alexander Reiter wrote:
> hi all,
>
> I've a problem with the System.Windows.Forms.Form Paint Event. I am calling the paint event with the following
> line: this.Paint += new PaintEventHandler(Draw_Graphics); the Draw_Graphics part is simple drawing some
> curves and lines to the Form.
> My problem is now, that as soon as I start to resize the form the Paint event is only called when I increase the
> form size. When I decrease the size nothing is happening.
I believe that is the intended behavoir. Have you tested on windows?
You can do a SetStyle (ControlStyles.ResizeRedraw, true) or you can
subscribe to the SizeChanged event and do drawing there.
Cheers,
Jackson
> I just started to get deeper into C# and mono + forms, so any hint where I can start to search ?
>
> br
> alex
> _______________________________________________
> Mono-winforms-list maillist - Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
More information about the Mono-winforms-list
mailing list