RE: [gtkmm] Detecting double-click in a treeview and more



> -----Original Message-----
> From: Paul Davis [mailto:paul linuxaudiosystems com] 
> Sent: Freitag, 11. April 2003 18:29
> To: Howdy Pierce
> Cc: Moses McKnight; gtkmm-list gnome org
> Subject: Re: [gtkmm] Detecting double-click in a treeview and more 
> 
> 
> >> Is there a way to detect a double-click in a treeview?
> >
> >Yes -- connect a signal handler to the button press signal 
> on the treeview.
> >
> >Then the signal handler should look something like this:
> >
> >bool MyWindow::on_mytreeview_button_press_event(GdkEventButton *ev)
> >{
> >   if (ev->type == GDK_2BUTTON_PRESS) {
> >      // it's a double click, so do something...
> >   }
> >
> >   return false;
> >}
> 
> true. just be warned that if you have a handler for a single press
> and/or single release, these will be executed before the one that sees
> the 2 button press. this can get gnarly, quite rapidly.

Doesn't connect_notify() take care of this?

Murray Cumming
murrayc usa net
www.murrayc.com 



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