Re: problem with motion_event on image
- From: "Jonathon Jongsma" <jonathon jongsma gmail com>
- To: oedipus <alexander arnoldt gmx de>
- Cc: gtkmm-list gnome org
- Subject: Re: problem with motion_event on image
- Date: Fri, 20 Oct 2006 08:35:00 -0500
On 10/20/06, oedipus <alexander arnoldt gmx de> wrote:
I had forgotten the Gdk::POINTER_MOTION_MASK. I included it, but still it
will not do?
Here is some of my code, to see the initialisation:
image1->signal_expose_event().connect(SigC::slot(*this,&main_window_glade::on_image1_expose_event),
false);
image1->signal_motion_notify_event().connect(SigC::slot(*this,&main_window_glade::on_image1_motion_notify_event),
false);
main_window->signal_delete_event().connect(SigC::slot(*this,&main_window_glade::quit),
false);
image1 -> add_events(Gdk::POINTER_MOTION_MASK);
and the signal:
bool main_window::on_image1_motion_notify_event(GdkEventMotion *ev)
{
label1 -> set_text("event is there");
return 0;
} // i have that reduced to a minumum first
Thanks for the help
Assuming that image1 is a Gtk::Image object, this is one of the set of
widgets that doesn't have its own Gdk::Window so they don't receive
events (in order to improve performance). If you want to catch an
event on this object, you'll probably need to stuff it into a widget
that does receive events, like a Gtk::EventBox and catch the events on
that widget. See this page for more information:
http://gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch13.html
--
jonner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]