[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtkmm
Subject:    Re: catching a mouse scroll event on a Gtk::DrawingArea
From:       Rob Benton <rob.benton () conwaycorp ! net>
Date:       2006-02-19 19:53:29
Message-ID: 43F8CCB9.2070203 () conwaycorp ! net
[Download RAW message or body]

Well I thought I was but it looks like I was adding it to the wrong 
widget :)


Jonathon Jongsma wrote:
> Have you added the necessary events? (i.e. Gtk::Widget::add_events())
> 
> Jonner
> 
> On 2/18/06, Rob Benton <rob.benton@conwaycorp.net> wrote:
> 
>>Can this be done?  I tried with the signal_scroll_event() signal but I'm
>>not getting into the handler:
>>
>>
>>MyWindow::MyWindow()
>>{
>>   _drawarea.signal_scroll_event().connect(sigc::mem_fun(*this,
>>     &MyWindow::on_drawarea_scroll));
>>}
>>
>>bool MyWindow::on_drawarea_scroll(GdkEventScroll * e)
>>{
>>   if (e->direction == GDK_SCROLL_UP)
>>   {
>>     // up code
>>   }
>>   else if (e->direction == GDK_SCROLL_DOWN)
>>   {
>>     // down code
>>   }
>>   g_print("%d\n", e->direction);
>>
>>   return true;
>>}
>>_______________________________________________
>>gtkmm-list mailing list
>>gtkmm-list@gnome.org
>>http://mail.gnome.org/mailman/listinfo/gtkmm-list
>>
> 
> 
> 

_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic