2010-06-27 43 views

回答

0

你應該只能夠訪問propertiesn-columnsn-rows

可以使用這樣做:

cols = mytable.get_property('n-columns') 
rows = mytable.get_property('n-rows') 
0

您必須閱讀GTK屬性:

t = gtk.Table(myNumberOfRows, myNumberofCols) 
t.get_property("n-rows") # number of rows in the table 
t.get_property("n-columns") # number of cols in the table 
0

在最新版本的PyGTK的你可以得到/通過table.props.n_columnstable.props.n_rows,設置這些值其中與get_property()(在其他答案中提及)和set_property()方法是同義詞。