> Hi, > I am using a ListStore model to store data for a TreeView. Given a row > iter, how can I get the previous iter?? I couldn't find any simple way > to do it. I checked the PyGTK reference and only found a funciton to > get the next iter (iter_next). > Found it after some more googling:
def prev_iter(self, iter): path = self.model.get_string_from_iter(iter) if path == 0: return None prevPath = int(path) -1 return self.model.get_iter_from_string(str(prevPath)) Cheers, Vinay _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
