Re: Images and Signals



JOSE PEDRO SERGIO ROMAO MACHADO wrote:

Hi there!

I'm trying to close a About window with an image clicked.

I've tryied several GtkImage signals but noone is emmited when I click on the image.

I'm trying to do the same on Gimp's Help->About... window does, when you click on the Gimp's logo image.

Does someone knows which signal must I use to respond to an Mouse Click on the image???

Thanks in advance.


You need to use a GtkEventBox. Have a look at the eventbox example application in the GTK+ examples source directory. Add a GtkEvenBox to your dialog first and set it to catch "button_press_event" signals, like the eventbox example does. Then add your GtkImage to the GtkEventBox. Now when you click the image the dialog will close, if you connect up the GtkEventBox "button_press_event" signal correctly.

Jeff Franks




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]