I recently saw a question on "how to make a grid of buttons whose size changes automatically". I found a very interesting example of code there, however, the proposed method created the buttons in a "for", which did not allow them to be set to a specific parameter. Here is this code:
frame = Frame(root)
Grid.rowconfigure(root, 0, weight = 1)
Grid.columnconfigure(root, 0, weight = 1)
frame.grid(row = 0, column = 0, sticky = N + S + E + W)
grid = Frame(frame)
grid.grid(sticky = N + S + E + W, column = 0, row = 7, columnspan = 2)
Grid.rowconfigure(frame, 7, weight = 1)
Grid.columnconfigure(frame, 0, weight = 1)
for x in range(10):
for y in range(5):
btn = Button(frame)
btn.grid(column = x, row = y, sticky = N + S + E + W)
for x in range(10):
Grid.columnconfigure(frame, x, weight = 1)
for y in range(5):
Grid.rowconfigure(frame, y, weight = 1)
Could you tell me how to make each button different?