public Gtk.Widget WrapWithButton(Gtk.Widget widget) { if (widget is Gtk.Button) { return(widget); } var button = new Gtk.Button() { Image = widget, Label = this.Label, Visible = widget.Visible, Sensitive = widget.Sensitive, UseUnderline = this.UseUnderline }; button.AddEvents((int)Gdk.EventMask.ButtonPressMask); button.ButtonPressEvent += this.ButtonPressed; button.Clicked += this.OnClick; GtkEngine.ReplaceChild(widget, button); return(button); }