Re: [gtk-list] Re: Getting selection from a CList?



Olof Oberg wrote:

> I talked to _Codex about it this week. I think he will fix it
> soon. For single selections it should just be returning
> gtkclist->selection as is and for multiple selections one has
> to consider which format the 'selection list' should be in.
>
> What I dont understand what gtk_get_selection_info(....) does
> though.
>
> Btw, how do you do it with catching signals?

here's how I do it...

gchar *titles[2] = {"Col 1", "Col 2"};
GtkWidget *clist;

clist = gtk_clist_new_with_titles(2, titles);
gtk_signal_connect(GTK_OBJECT(clist), "select_row", GTK_SIGNAL_FUNC(clist_cb),
NULL);
gtk_widget_show(clist);

the callback...

void clist_cb ( GtkWidget *clist, gint row, gint column,
                        GdkEventButton *event, gpointer data)
{
    gchar *text;
    gtk_clist_get_text(GTK_CLIST(clist), row, column, &text);

    /* ... */
}

Unfortunately, this only does single clicks :(
does anyone know how to bind double click events to the clist?

thanks,
Aaron

>
>
>  /mill
>
> --
> #############################################################
> # S-mail: Olof Oberg     #  mill@pedgr571.sn.umu.se         #
> #         Pedagoggr. 7A  #  mill@ludd.luth.se               #
> #         S-907 30 Umea  #  tdv94oog@cs.umu.se              #
> # Phone:  090-197395     #  http://pedgr571.sn.umu.se/~mill #
> #############################################################
>
> --
> 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]