Search code examples
c#gtkgtk#gladegtkbuilder

How do I connect glade signals using GtkBuilder in C#?


In python, I could just do builder.connect_signals(self). It doesn't seem like this method exists in C#, and after looking at the GtkBuilder documentation, it looks like python is the exception, rather than the rule. How would I accomplish the same thing in C#?


Solution

  • Right now Gtk.Builder is not fully implemented in the current version of Gtk# (2.12). This thread explains the current situation. So once Gtk# 2.14 is released, you can just do:

    builder.Autoconnect (this);
    

    In the meantime you could use Glade.XML, and then convert your code (and glade files) as described here: http://lists.ximian.com/pipermail/gtk-sharp-list/2008-October/009157.html