Re: TreeView, Row and double click



cyril ponsan wrote:

Hello,

I wish to know how to put a double click signal handler on a treeview row. I'd want to for example to open a windows in function of the row if the user double click on a row...

I don't see how to do, i looked on google for infos about dble click in gtkmm and found nothing...

Cheers in advance for any answer

_________________________________________________________________
Ne cherchez plus, trouvez ! Avec le nouveau MSN Search. http://search.msn.fr/

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list


Because treeview row objects don't receive mouse events and are not descended from Gtk::Widgets, try the following:

Use Gtk::TreeView::get_events and Gtk::TreeView::set_events to add the Gdk::2BUTTON_PRESS event to the others received by the treeview, and then connect to the Gtk::TreeView::signal_event() function to specifiy your callback function. Then, within that callback, determine which row was selected and then open your window accordingly.

If I'm all wet here, someone correct me, please.

Bob Caryl




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