Re: [gtk-list] GtkCList question



Cast all the data pointers in the GList clist->selection to integers and
those are your selected rows.  Call me cheap, but it works :)  

-----------------------------------------------------------------------
Jay Painter -- jpaint@serv.net -- jpaint@gimp.org -- jpaint@real.com
http://www.serv.net/~jpaint

On Wed, 13 May 1998, Blaise Camp wrote:

> Okay, this seems like a really dumb question, but I'm not seeing it.
> How do you find out what row a selection is on in a GtkCList?
> 
> Here's what I have, in part:
> 
>     if (data->selection == NULL) {
>         gtk_widget_show (no_selection_dialog);
> 	return (0);
>     }
>     row_num = gtk_clist_find_row_from_data (GTK_CLIST (clist), 
>     		GTK_CLIST(clist)->selection->data);
> 
> row_num always comes out as -1.  I have 15 rows in the list.  Is this totally
> wrong?
> 
> -Blaise
> 
> -- 
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 




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