Re: GtkList number of items? gtk_object_set_data (GList)?



Well I just get into the same problem... (see one of my post, still waiting
moderator approval)

In fact with a GtkCList there is noway (official) to get the number of items
or rows (well at least it is well kept in the other case...) So one bad way
to get it is that :

GtkWidget        *clist;
guint                iNbItems;

iNbItems = GTK_CLIST(clist)->rows;


But I would advise you to encapsulate it (to make a function or macro doing
this job)! So if you use it in many points in your code and in the future
this call is not working. You just have to change it in one point, and the
change will apply to all your program :-)



Best regards,
---
Jean-Christophe Berthon

Cap Gemini -- Ernst & Young
Toulouse FR
Skill Aerospace -- Image Quality
Email: Jean-Christophe Berthon cgey com
Tel : (+33) 561 31 6639


----- Original Message -----
From: "Andrés Giraldo" <andres_giraldo yahoo com>
To: "Jean-Christophe Berthon" <jberthon capgemini fr>
Sent: Tuesday, July 10, 2001 5:22 PM
Subject: Re: GtkList number of items? gtk_object_set_data (GList)?


> Ok! Thanks by your help!
>
> g_list_length works pretty well with GList widgets,
> but I need to work with a GtkList...
>
> There's any way to pass from one to another?
>
> I mean.. can I use g_list_length with a GtkList, if I
> can... how should I do this? because I already tried
> something like ...
>
> g_list_length ((GList *)mygtklsit)
>
> and it doesn't work
>
> Thanks again!
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/





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