On Tue, 8 Aug 2000, Fabiano Fantini Vitale wrote:

 Hi, 

> Hi ,
> 
> I want to know if exists a function wich return the number
> of the current selected row.
> I try  //return (gint)clist->selected->data//, but returned a strange number

 Such function doesn't exist since there are selection modes in which several 
 rows could be selected.
 If it's not the case for you (i.e. you have the list with selection modes
GTK_SELECTION_{SINGLE,BROWSE}), then the following could be used as a
function (returns -1 if nothing is selected):

int selected_row(GtkWidget* l)
{
    GList* sel = GTK_CLIST(l)->selection;
    return sel ? int(sel->data) :  -1;
};

 
> thanks 
> -- 
> Fabiano Fantini Vitale <[EMAIL PROTECTED]>
> Conectiva S.A.
> 
> _______________________________________________
> gtk-list mailing list
> [EMAIL PROTECTED]
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 

 Best regards,
  -Vlad


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

Reply via email to