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



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



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