[Mono-list] DrawingArea needs to redraw signal??

Michael Hutchinson m.j.hutchinson at gmail.com
Tue Nov 16 13:43:52 EST 2010

On Tue, Nov 16, 2010 at 6:09 AM, Francisco M. Marzoa <fmmarzoa at gmx.net> wrote:
> Hello,
> Currently I'm handling the ExposeEvent -as Miguel de Icaza told me in a
> prior answer- but I ignored that there're another way to do the same. I
> assume that overriding OnExpose is not available through Monodevelop
> interface designer, isn't it? So I should do something like:
> drawingarea1.OnExpose += MyOnExposeMethodDelegate

You may also wish to use [ConnectBefore] on your event handler, and
set RetVal to true, so that the default handler doesn't get called.
All the GTK built-in behaviors are implemented as event handlers, but
GTK offers a way to stop events from propagating to other handlers
(set RetVal to true), so built-in handlers often "swallow" events. You
can use ConnectBeforeAttribute to insert handlers before the

Note also that you should use the Drawable object from the expose
event's Window property, not the widget's GdkWindow property. This is
a temporary double-buffered surface.

Michael Hutchinson

More information about the Mono-list mailing list