Re: GtkTreeView click events



On Mon, 17 Jun 2002 16:54:02 -0400
"Jeremy Wise" <jwise springthrough com> wrote:


Let me know if you need any more information.  The docs on this seem
sparse, and I couldn't tell much more looking at the source.

the signals you are looking for are defined for the GtkWidget class, the
treeview inherits them from the widget class.

g_signal_connect(G_OBJECT(tree), "button_press_event",G_CALLBACK(button_press_lcb),data);

in the event callback you look if it is a doubleclick or the third mouse button etc.

static gboolean button_press_lcb(GtkWidget *widget, GdkEventButton *event, gpointer data) {
        if (event->button == 3) {
                /* do something */
        }
        return FALSE; /* pass the event on */
}

regards,
        Olivier

Attachment: pgpYpfXFiFVQG.pgp
Description: PGP signature



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