For some reason I'm getting 'no attribute' errors when trying to get or set grid lines when using PyGTK:

import gtk
t = gtk.TreeView()
print t.get_grid_lines()

Gives:

'AttributeError: 'gtk.TreeView' object has no attribute 'get_grid_lines'

Here is the relevant documentation entry: http://www.pygtk.org/docs/pygtk/class-gtktreeview.html#method-gtktreeview--get-grid-lines

And my pyGTK version is 2.4.1 and my gtk version is 2.4.9 which leaves me with no clue as to why I can't get at this function when everything else works.

有帮助吗?

解决方案

The documentation you linked to says that the function is only available in pyGTK 2.10 or later so your version is too old to have it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top