Ejemplo n.º 1
0
 def grid_remove_all (grid: Gtk.Grid) -> None:
     for child in grid.get_children ():
         grid.remove (child)
Ejemplo n.º 2
0
def num_grid_rows(grid: Gtk.Grid) -> int:
  grid_children = grid.get_children()
  assert len(grid_children) % 2 == 0
  return int(len(grid_children) / 2)
Ejemplo n.º 3
0
def rows(grid: Gtk.Grid) -> int:
    return max(map(lambda child: grid.child_get_property(child, 'top-attach'),
                   grid.get_children()),
               default=-1) + 1
Ejemplo n.º 4
0
 def grid_remove_all(grid: Gtk.Grid) -> None:
     for child in grid.get_children():
         grid.remove(child)