[Gtk-sharp-list] (no subject)
Jeremiah McElroy <email@example.com>
Tue, 21 Dec 2004 11:05:07 -0500
If I understand correctly, you would like to create an image that acts
like a button, but does not have the borders that a button has.
If you take a look at the documentation for Gtk.Image, you'll find
that you can include the Image inside a Gtk.EventBox to hook it up to
Here's an example. Keep in mind that this example is incomplete and
you would still have to provide a one or two more methods and hook up
some additional events, depending on what you wanted.
public static void Main (string  args)
window = new Gtk.Window ("Eventbox");
window.DeleteEvent += new DeleteEventHandler (delete_event);
window.BorderWidth = 10;
eventbox = new EventBox ();
image = new Gtk.Image ("myImage.png");
eventbox.ButtonPressEvent += new ButtonPressEventHandler (exitbutton_event);
static void exitbutton_event (object obj, ButtonPressEventArgs args)
On Tue, 21 Dec 2004 12:17:41 +1100, roy <firstname.lastname@example.org> wrote:
> I am a new beginner , I hope I can use image, but I want to use the clicked
> event. can you help me . and I also want to change the button's style as I
> do want let them looks like label. so I can use the clicked event.