[pygtk] Re: mark rows with pattern in treeview
Johan Dahlin
jdahlin at async.com.br
Fri Mar 9 06:12:48 WST 2007
> You'll probably end up with something like this:
>
> selection.unselect_all()
> iter = model.get_iter_first()
> while iter:
> value = model.get_value(iter, column)
> if value is what I'm looking for:
> selection.select_iter(iter)
> iter = model.iter_next(iter)
Or, the same thing using a slightly more pythonic api;
for row in model:
if row[column] is what I'm looking for:
selection.select_iter(iter)
break
--
Johan Dahlin <jdahlin at async.com.br>
Async Open Source
More information about the pygtk
mailing list