Andreas Scherf wrote:

> Carl Seleborg wrote:
> 
>> Hi all,
>> 
>> I am very new to GTK, so if my questions are too basic, please point me to a
>> good FAQ. :-)
>> 
>> I'm fooling around with the CList widget, and after having gone though the
>> header file for the widget, there seems (to me) to exist no simple way to
>> determine the selected row of a single-selection list, or at least to know if a
>> row is selected. Is there something I have missed? Should I look somewhere else?
>> 
>> Thanks in advance for your answers.
>> -- Carl
>> 
> 
> I think this must work :
> while(clist->selection)
> {
>   ... code ...
>   clist->selection =clist->selection->next;
> }
> 
> MfG
> Andreas Scherf


This would most certainly get you into trouble.  You don't want
to change the value of the selection member variable.  To iterate
over the selected rows try this instead:

GList *selection = clist->selection;
while (selection)
{
   ... code ...
   selection = selection->next;
}


Darin


_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to