Gtk::DrawingArea with Cairomm from Glade - no Event



Hello,

I placed a Gtk::DrawingArea in Glade and realized it with cairomm. All
drawing on this surface works, but I get only expose events. Even if I
overwrite the on_event() functions I see not any more events. I'm
interested in the mouse button/position events. My first idea was to
use 

set_events (Gdk::EXPOSURE_MASK | Gdk::BUTTON_PRESS_MASK |
Gdk::BUTTON_RELEASE_MASK);

but this results in:

(state:15062): Gtk-CRITICAL **: gtk_widget_set_events: assertion
`!GTK_WIDGET_REALIZED (widget)' failed

Do I have to place my Gtk::DrawingArea in a Gtk::EventBox o catch my
mouse events? Any other hints?

regards
	Andreas


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