Il giorno gio, 13/07/2006 alle 22.54 -0700, David M. Cook ha scritto: > On Thu, Jul 13, 2006 at 03:21:02PM +0200, Alessandro Pellizzari wrote: > > > It works pretty good until circa row 900, showing the cell at the top of > > the treeview, then it begins going wrong, showing cell 930 (or similar) > > at the top and not scrolling down, even for cell, e.g., 1200, which goes > > out of the visible area. > > Try doing the scroll_to_cell in an idle_add callback.
OK, it took me a while to understand (never used idle_add :) Thank you for your help. I tried: ... if (self.magaddpath != 0): print self.magaddpath selection = self["tv_mag_list"].get_selection() gobject.idle_add(self._scroll_to_cell, self.magaddpath) selection.select_path(self.magaddpath) self.on_tv_mag_list_selected() self.magaddpath=0 def _scroll_to_cell(self, pos): self["tv_mag_list"].scroll_to_cell(pos) This all is part of a class, hence self._scroll_to_cell inside idle_add() It works exactly as before, showing the row as last cell in the view It seems that it makes his best to show it, but also tries to show something else. I've also read something about page_clamp() or similar, but it seems it doesn't exist anymore for treeviews, only for adjustments. Any other ideas? -- Alessandro Pellizzari _______________________________________________ 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/