Skip to content

Commit

Permalink
Mention that Gtk.TreePath can be treated like a list
Browse files Browse the repository at this point in the history
  • Loading branch information
sebp committed Oct 27, 2012
1 parent 7115b64 commit 33e83ac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/treeview.txt
Expand Up @@ -132,6 +132,10 @@ path "2:4" refers to the fifth child of the third node.
# Get value at 2nd column
value = treestore.get_value(treeiter, 1)

Instances of :class:`Gtk.TreePath` can be accessed like lists, i.e.
``len(treepath)`` returns the depth of the item ``treepath`` is pointing to,
and ``treepath[i]`` returns the child's index on the *i*-th level.

TreeModel Objects
^^^^^^^^^^^^^^^^^

Expand All @@ -151,6 +155,11 @@ TreeModel Objects
Returns a :class:`Gtk.TreeIter` instance pointing the node following
*treeiter* at the current level or ``None`` if there is no next iter.

.. method:: iter_previous(treeiter)

Returns a :class:`Gtk.TreeIter` instance pointing the node previous to
*treeiter* at the current level or ``None`` if there is no previous iter.

.. method:: iter_has_child(treeiter)

Returns ``True`` if *treeiter* has children, ``False`` otherwise.
Expand Down

0 comments on commit 33e83ac

Please sign in to comment.