Esempio n. 1
0
 def load_favourites(self):
     row, column, max_h = 0, 0, 6
     for grid_config in self.get_favourites():
         grid = Grid(self, font=(grid_config[1], 12))
         grid.set(grid_config[0])
         self.grids.append(grid)
         grid.place(x=column * 40, y=row * 40, width=40, height=40)
         if row == max_h - 1:
             column += 1
             row = 0
         else:
             row += 1
     self.body.config(width=(column + 1) * 40, height=max_h * 40)