[10298] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: GtkCList and selection?

daemon@ATHENA.MIT.EDU (Kemal 'Disq' Hadimli)
Fri Nov 20 22:19:43 1998

Date: Sat, 21 Nov 1998 05:19:31 +0000 (GMT)
From: "Kemal 'Disq' Hadimli" <disq@iname.com>
To: gtk-list@redhat.com
In-Reply-To: <19981120171617.A15278@tis.com>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

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.


-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post