Re: [gtk-list] Re: clist selected row function



> > GTK_CLIST(gtkclist)->selection, which is a GList of the
> > GtkCListRow pointers for selected rows.
> > 
> > Assuming you have set the row data uniquely, you can use
> > gtk_clist_find_row_from_data(clist,
> > 	((GtkCListRow *)GTK_CLIST(clist)->selection->data)->data);
> 
> 
> This is incorrect, it was changed before the 1.0 release. clist->selection
> is a glist where the data pointer is the row numbers of the selected rows.
> Cast like: row = (gint) list->data
> 
> 

Thank you.

I am now able to receive the data I want from a selected clist row
any time I want, not just after a clist select_row event. :

if ( (GTK_CLIST(nameClist)->selection) ) {
	row = (gint) (GTK_CLIST(nameClist)->selection->data);
	gtk_clist_get_text(GTK_CLIST(nameClist), row, column, &mydata);
} 
else
	mydata = "";






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