Re: Probleme with Release button event.

Hi Florent,
Not exactly sure how you connected your signal handler.  The code I used was this:

I connected a signal handler to the DrawingArea with
    Grid *area =Gtk::manage(new Grid());
    area->signal_event().connect(sigc::mem_fun(*area, &Grid::on_event_happened));
Grid is a class derived from a Drawing area.

In the on_event_happened() method(declared:   bool on_event_happened(GdkEvent *event);  )
I then just went looking for the event type I was looking for and defined the effect:

if (event->type == GDK_BUTTON_PRESS) {
It compiles and runs.

The enum list for events is in
so long as you've got the gtkmm docs installed.  It looks like you've already found it.


From: Florent Blanchon <florent blanchon gmail com>
To: gtkmm-list gnome org
Sent: Tue, 6 October, 2009 8:18:13 AM
Subject: Probleme with Release button event.

Hello all.

I'm doing a chess board, so I'm using a Drawing Area.
I'd like to activate release button event.

But even by connecting my signal handler ( signal_button_release_event() ) and set_events(...), I can't get the event.....

Is someone can help me ?


Get more done like never before with Yahoo!7 Mail. Learn more.

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