I am not absolute sure but I think I got the solution. Here is the code snipped
def MyTreeView(Gtk.TreeView): ... def compute_rows_per_page(self): # height of first cell col = self.get_column(0) rect = col.cell_get_size() renderer = col.get_cells()[0] ypadding = renderer.get_padding()[1] height_row = rect.height + ypadding # height of treeview height_view = self.get_visible_rect().height # result print('{} / {} = {}' .format(height_view, height_row, (height_view/height_row))) _______________________________________________ python-hackers-list mailing list python-hackers-list@gnome.org https://mail.gnome.org/mailman/listinfo/python-hackers-list