Re: [gtk-list] Double-clicking in CLists (Gtk-perl)
- From: turnere <turnere MimeStar com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Double-clicking in CLists (Gtk-perl)
- Date: Thu, 16 Dec 1999 19:43:11 -0500 (EST)
On Fri, 17 Dec 1999, Frank R. Larsen wrote:
> Hello,
>
> I've been looking into the Gtk+ reference manual on CList. I've been
> loking for a way to trap doubleclicks on an element in a Clist. Is there
> an easy way of trapping this?
try this:
gtk_signal_connect(GTK_OBJECT(clist_widget), "event",
GTK_SIGNAL_FUNC(clistEventCallback), NULL);
int clistEventCallback(GtkWidget *clist, gint row, gint column,
GdkEventButton *bevent, gpointer data)
{
if ((bevent) && (bevent->type == GDK_2BUTTON_PRESS))
{
/* do whatever you want to do upon a doubleclick */
return(TRUE);
}
return(FALSE);
}
ttyl,
Elliot
>
> The only way I've found so far is to set a time-of-press variable when a
> row is selected and compare this to the current time-of-press the next
> time the row is selected.
>
> I just think there ought to be an easier way to trap double-clicks.
>
> Frank Ronny Larsen
> --
> Here lies a toppled god, his fall was not a small one,
> we did but build his pedestall, a narrow and a tall one.
> _______________________________- Tleilaxu Epigram DM141.
> Frank R. Larsen - gobo@gimle.nu - http://gimle.nu/~gobo/
>
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]