Reputation: 5825
I have a class that inherits button and it looks like this:
public class MyButton : Button {
Gtk.Image image; // This doesn't work
}
I need to initiate a GTK Widget that belongs to the class "MyButton". However, I can't really do it. Thanks!
Upvotes: 0
Views: 358
Reputation: 17482
It's hard to tell what exactly you're trying to do... If you're trying to set the image property of the GtkButton (see http://developer.gnome.org/gtk/stable/GtkButton.html#GtkButton--image), something like this should work:
public class MyButton : Gtk.Button {
public MyButton (Gtk.Image image) {
GLib.Object ();
this.image = image;
}
}
Upvotes: 1