Re: [gtkmm] Detecting double-click in a treeview and more
- From: Paul Davis <paul linuxaudiosystems com>
- To: "Howdy Pierce" <howdy cardinalpeak com>
- Cc: "Moses McKnight" <moses gcecisp com>, gtkmm-list gnome org
- Subject: Re: [gtkmm] Detecting double-click in a treeview and more
- Date: Fri, 11 Apr 2003 12:28:40 -0400
>> 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.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]