Re: [gtk-list] GtkCList and selection?



On Fri, 20 Nov 1998, Michael Elkins wrote:

> It is unclear from looking at the docs how to get the (list of) selected
> rows in a GtkCList.  I can see the ->selection member of the GtkCList
> struct, but no function to access it in a generic manner.  Am I missing
> something here?

  GList *list;
  guint row;

  list = GTK_CLIST(clist)->selection;
  while (list)
    {
    row=(gint)list->data;
    printf("row %i is selected, do whatever you want with it\n",row);
    list = list->next;
    }


as you see, the selection member is a GList. (and a GList is a
doubly-linked list)


> me
me too.




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