[gtkmm] label en button_press_event problems



Ok, i am trying to connect an signal_button_press_event to a Gtk::Label.
I use the following code:

testlabel.signal_button_press_event().connect( SigC::slot(
&PresenceWindow::on_button_press_event )  );

on_button_press_event prototype looks like this:

virtual bool on_button_press_event(  GdkEventButton* )


when i compile the program, i get the following error:

error:no matching function for call to `
Glib::SignalProxy1<bool,
GdkEventButton*>::connect(SigC::Skot2<bool,PresenceWindow&,GdkEventButton*>)

anyone knows what's going on? I've red the signal parts of the book and
i don't see where my code differs from the examples. Except for one
thing, i'm using a Label instead of a Button, but that shouldn't make a
difference, should it?

regards,

bart




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