[Gtk-sharp-list] Mono-cairo and Gtk# question regarding expose event

Eskil Bylund eskil.bylund at gmail.com
Mon Sep 10 05:44:08 EDT 2007

When calling g_signal_connect the handler will be called before the
default handler, i.e. the custom drawing happens before all the other
widgets are drawn. The opposite is done by gtk-sharp when connecting
to an event. The order can be changed by using the

public void Expose(object o, Gtk.ExposeEventArgs args)

The other (recommended) way is to subclass the object and override the
virtual method for the default handler.

protected override bool OnExposeEvent(Gdk.EventExpose evnt)
// Custom drawing before and/or after the default handler.
// The default handler can also be ignored completely.
return base.OnExposeEvent(evnt);


More information about the Gtk-sharp-list mailing list