[pygtk] Restore a scrolling position
Lionel Dricot
zeploum at gmail.com
Thu Feb 19 19:41:31 WST 2009
Hello,
In a previous mail, I asked about restoring the scrolling position in a
treeview :
http://www.mail-archive.com/pygtk@daa.com.au/msg17224.html
This was solved thanks to Neil and Walter with the following line of codes
at the end of my refresh function :
gobject.idle_add(self.task_tview.get_vadjustment().set_value,vscroll_value)
gobject.idle_add(self.task_tview.get_hadjustment().set_value,hscroll_value)
(with values being read at the start of the refresh function, of course)
But I discovered a problem : if elements have been removed from the
treeview, the scroll will go to an empty position.
In some case, it means that you will see only a blank treeview because
remaining elements are hidden on top (but no scrollbar are displayed).
So how can check before inserting the scroll_value that I didn't pass the
upper bound of the possible scroll ?
Thanks in advance for your help,
Lionel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090219/d7e38637/attachment.htm
More information about the pygtk
mailing list