Re: number of entries in GtkCombobox
- From: Lance Dillon <riffraff169 yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: Re: number of entries in GtkCombobox
- Date: Tue, 19 Sep 2006 09:04:19 -0700 (PDT)
Okay, that's better. I didn't see the special case.
----- Original Message ----
From: tomas tuxteam de
To: Lance Dillon <riffraff169 yahoo com>
Cc: gtk-app-devel-list gnome org
Sent: Tuesday, September 19, 2006 11:45:06 AM
Subject: 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]