Re: Number of rows
| From: | Scott Mattocks | Date: | Mon, 13 Feb 2006 14:01:59 +0000 |
| Subject: | Re: Number of rows | ||
| References: | 1 2 3 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6729@lists.php.net to get a copy of this message | ||
Eduardo RBS wrote:
the php-gtk2 manual say: int iter_n_children(GtkTreeIter<http://php-gtk2.de/manual/en/html/gtk/gtk.gtktreeiter.html> *iter*); Returns the number of children *iter* has. But now... how can I get the "GtkTreeIter"? I can't understand what's a "Iter" yet.. and how to get the number of rows of a GtkTreeView (or a GtkListStore??).An iter is just a location in a list or tree. It points to an element in the list. For lists you can think of it sort of as an array index. If you pass null as the iter, iter_n_children will return the number of top-level elements in the list/tree. In a list, all elements are top-level. If you have a tree, you will have to recurse through the tree to get a count of the total number of children. -- Scott Mattocks http://www.crisscott.com