Re: Double click events

This is a fairly easy one.  Connect to the button_press signal of the
clist, and then you can use the following code to find to catch the double
  if (/* check button press type */) {
    gint row, col;
    if (!gtk_clist_get_selection_info(clist, event->x, event->y, &row, &col))
      /* the click must have been on the scrollbar, header or border */
      return FALSE;
    /* button press was on cell (row,col) */
    return TRUE;
  return FALSE;

remember to make sure that the event mask is set correctly for the events
you want to catch.



On Mon, 3 May 1999, JP Rosevear wrote:

> I'm trying to get a double-click type of event out of a CList widget.  I
> can use the row_select signal to track the row number, but I'm unsure as
> to how to detect a double click (even on a container of any type for
> that matter).
> This is more a gtk question but I got such a good response last time...
> -JP
> -- 
> To unsubscribe: mail with "unsubscribe"
> as the Subject.

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