[10617] in The GTK GIMP ToolKit mailing list archive

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

[gtk-list] Re: How to get data or row from clist selections

daemon@ATHENA.MIT.EDU (Michael Elkins)
Wed Dec 2 18:51:01 1998

Date: Wed, 2 Dec 1998 15:51:17 -0800
From: Michael Elkins <michael@tis.com>
To: gtk-list@redhat.com
In-Reply-To: <19981202154837.A394@nai.com>; from Michael Elkins on Wed, Dec 02, 1998 at 03:48:37PM -0800
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

On Wed, Dec 02, 1998 at 11:34:22PM +0100, Andreas Tille wrote:
> this is my first try with the CList widget.
> Suppose that I have set data via
> 
>       gtk_clist_set_row_data(clist, row, data)
> 
> to a CList widget clist.  Now the user has selected some rows
> of this widget (SELECTION_EXTENDED).
> I'm able to obtain a GList of all selected rows via
> 
>       GList *selections = clist->selections
> 
> but what I want to know is a list of all data, which I want to handle
> (or a list of all row numbers, respectively to get the wished
>  data via gtk_clist_get_row_data(clist, selected_row);  )

Try:
	gtk_clist_get_row_data(GTK_CLIST(clist),(gint)GTK_CLIST(clist)->selection->data);

	the selection list contains the row numbers that are selected...

me

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


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