[pygtk] Retrieve Iter before "iter selected" in a treeview
Timo
timomlists at gmail.com
Fri May 7 15:19:58 WST 2010
On 07-05-10 00:17, Pasquale Ambrosini wrote:
> Hi at all, i have a trouble with treeview and iter in pygtk.
> In a list, for retrieve the iter after iter selected, there is a
> function in TreeModel:
> http://www.pygtk.org/docs/pygtk/class-gtktreemodel.html#method-gtktreemodel--iter-next
> and one for first iter:
> http://www.pygtk.org/docs/pygtk/class-gtktreemodel.html#method-gtktreemodel--get-iter-first
> but how to retrieve iter after iter selected?
You probably need the gtk.TreeSelection.get_selected() method. It
returns a tuple with the treemodel and selected iter.
You can also connect to the "changed" signal of the gtk.TreeSelection,
and cal get_selected() there. This is handy most of the times.
Cheers,
Timo
> It's a stupid question, but i can't find a solution.
> Thanks.
>
> --
> ___________________________________________________________________________________________________________________________________
>
> Pasquale Ambrosini<pasquale.ambrosini at gmail.com
> <mailto:pasquale.ambrosini at gmail.com>>
>
>
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
More information about the pygtk
mailing list