Re: number of entries in GtkCombobox



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Sep 19, 2006 at 08:34:56AM -0700, Lance Dillon wrote:
I'm not sure I like this answer, it seems to be way to much for this question,
but it looks like the best way to do it is to get a GtkTreeIter with
gtk_tree_model_get_iter_first(), then walk the list with gtk_tree_model_iter_next(),
counting up the number of rows:

There is gtk_tree_model_iter_n_children ():

 | gint gtk_tree_model_iter_n_children(GtkTreeModel *tree_model,
 |                                     GtkTreeIter *iter);
 | 
 | Returns the number of children that iter has. As a special case, if iter
 | is NULL, then the number of toplevel nodes is returned.

HTH
- -- tomÃÂs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFEBCCBcgs9XrR2kYRAnKoAJ9udyMXFULPZfDhdVt50d5H62MrFACeKB4s
pHwsM5/sWoBj4AkdwhbS5A0=
=ME1l
-----END PGP SIGNATURE-----




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