문제

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