Re: problem handling "mouse button press"
- From: Havoc Pennington <hp redhat com>
- To: Gregory Babusiaux <gbabusia ulb ac be>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: problem handling "mouse button press"
- Date: 17 Mar 2002 21:51:11 -0500
Gregory Babusiaux <gbabusia ulb ac be> writes:
i got a pixmap on my main window and i would like to catch the
button press event on this pixmap
to create my pixmap i use the function gtk_create_pixmap_from_xpm
and my main window only contains my pixmap
i tried the function gtk_signal_connect(pixmap,
"button_press_event", cllaback, NULL) but it doesn't work???
Pixmaps are "no window" widget so don't get events.
Create a GtkEventBox, place the pixmap inside that,
then connect your callback to the event box. You need to
gtk_widget_set_events() or gtk_widget_add_events()
GDK_BUTTON_PRESS_MASK on the event box.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]