I have a treeview 'browser' that I'm using that connects to browse() when activated (i.e. every time the working directory changes). (Below is the pertinent portion.) I'm using a dictionary to remember the position of the treeview for each folder, but it doesn't seem to be working. Could anyone help out?
Cheers, Andrew def browse(self, root='/', object=None): # Don't do anything if we activate a file if self.c.do.lsinfo(root) == []: return self.browserposition[self.w('browser').wd] = [self.w('browser').get_hadjustment(), self.w('browser').get_vadjustment()] print self.browserposition # Get adjustment for '/' try: h, v = self.browserposition[root] self.w('browser').set_hadjustment(h) self.w('browser').set_vadjustment(v) except KeyError: print "Error getting value for", root if root == '/': self.browserposition = {} self.w('browser').wd = root # Start doing stuff :) _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/