[gtkmm] catching doubleclicks



Hi,

do I need an eventbox (in a normal button) to catch a doubleclick or is the
a more simple solution to it???

I've tried the following without an eventbox:
button6->clicked.connect(SigC::slot(static_cast<class
setuphelpwindow*>(this),  &setuphelpwindow::on_helpaboutbutton_clicked));
and alternatively also
button6->button_press_event.connect(SigC::slot(static_cast<class
setuphelpwindow*>(this), &setuphelpwindow::on_helpaboutbutton_clicked));
in conjunction with my callback routine:
void setuphelpwindow::on_helpaboutbutton_clicked(GdkEventButton *ev)
{   
  if (ev->type == GDK_2BUTTON_PRESS)
    cout << "double clicked" << endl;
}
but it doesn't compile fine and I don't know what the problem is! (Is this
approach any useful anyway?)
Can someone please tell me what I'm doing wrong (and give me hints on what
to fix)? Thank you!

Michael.

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net




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