Pygtk tips (for myself)
I should definitely start to read the manual more attentively…
I ran into a situation where gtk.TreeView.scroll_to_cell() showed no effect. After 15mins’ search, I was pointed back to the manual page, where it writes:if a child has native scrolling (TreeView in my case), should use add() instead of add_with_viewpoint() for gtk.ScrolledWindow, and that solves the problem.
Another problem that I encountered today also involves the use of gtk.TreeView, I found out that the set_cursor() method refused to work for me as well. However, this time I was luckier as I soon (after some debugging) realized that the target colomn of the cell should be fully expanded (i.e. realized) to become a valid target of the method. This problem will only occur if the TreeView.get_model() is a TreeStoreObject (and thus not a ListStoreObject).