Re: ScrolledWindow on_button_release_event
- From: Matt Bragano <maestro485 comcast net>
- Cc: gtkmm-list gnome org
- Subject: Re: ScrolledWindow on_button_release_event
- Date: Wed, 21 Nov 2007 18:06:30 -0500
Jan Burgmeier wrote:
Hello,
I have a Gtk::Image inside a Gtk::ScrolledWindow and I try to ctach the on_button_release_event when clicking on the image.
I have tried to connect the event to the main Window and directly to the Image and ScrolledWindow but nothing helps.
The on_button_press_event is connected to the main Window and works.
I tried:
remoteScreenWindow is the Gtk::ScrolledWindow.
remoteScreenWindow.set_events(Gdk::BUTTON_RELEASE_MASK);
remoteScreenWindow.signal_button_release_event().connect(sigc::mem_fun(*this, &gui::on_button_release_event), false);
bool gui::on_button_release_event(GdkEventButton *e)
{
std::cout << "Release" << std::endl;
return true;
}
I compile under Windows XP with MinGW and GCC 3.4.5 and Gtk+ 2.10.11 and Gtkmm 2.10.10
Thanks
Jan Burgmeier
I'm not positive, but it might have something to do with 'return true;'
You might get some insight to the problem by doing this:
return this->on_button_press_event(e);
I had a problem a week or so ago that ended up being related to
returning 'true' instead of on_button_press_event(). I'm not sure if it
will help you or not, but it might be worth experimenting with.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]