Re: [gtk2]: gtktreeview signal when one left click ?
- From: Emmanuele Bassi <bassi-e libero it>
- To: gtk-app-devel-list gnome org
- Subject: Re: [gtk2]: gtktreeview signal when one left click ?
- Date: Sat, 9 Aug 2003 23:57:07 +0200
* TORRI Vincent <Vincent Torri math u-bordeaux fr>:
I've search the API and in the mailing list without finding what I want :
a event which would be sent by a gtktreeview when one left click (once !,
not double-click, that is the "row-activated" signal).
Does anybody know the answer (even a trick to get the row and the column
of the treeview, when one left click on the treeview) ?
I've done this for creating a context menu on a GtkTreeView, using
Python + PyGTK.
++
Just connect the "button-press-event" of the GtkTreeView widget, and
check for the "button" field of the event (GdkEventButton). If you want
ot retrieve the row, use the gtk_tree_view_get_path_at_pos() function.
That function uses the x and y coordinates relative to the widget in order
to get you the path at those coordinates (use the x and y fields of the
GdkEventButton struct).
Hope This Helps,
Emmanuele.
--
Emmanuele Bassi (Zefram) [ http://digilander.libero.it/ebassi/ ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738 08BD 8ECC DB8F A432 0FF4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]