I've tried this but it didn't help.
I'm making a calculator program. I've made this so far:
from tkinter import *
window = Tk()disp = Entry(window, state='readonly', readonlybackground="white")
disp.grid(column=0, row=0, columnspan=4)
#row 1
seven = Button(window, text="7", command=Seven)
seven.grid(column=1,row=1)eight = Button(window, text="8", command=Eight)
eight.grid(column=2,row=1)nine = Button(window, text="9", command=Nine)
nine.grid(column=3,row=1)divide = Button(window, text="÷", command=Divide)
divide.grid(column=4,row=1)#row 2four = Button(window, text="4", command=Four)
four.grid(column=1,row=2)five = Button(window, text="5", command=Five)
five.grid(column=2,row=2)six = Button(window, text="6", command=Six)
six.grid(column=3,row=2)multiply = Button(window, text="×", command=Multiply)
multiply.grid(column=4,row=2)#row 3one = Button(window, text="1", command=One)
one.grid(column=1,row=3)two = Button(window, text="2", command=Two)
two.grid(column=2,row=3)three = Button(window, text="3", command=Three)
three.grid(column=3,row=3)minus = Button(window, text="-", command=Minus)
minus.grid(column=4,row=3)#row 4zero = Button(window, text="0", command=Zero)
zero.grid(column=1,row=4)dec = Button(window, text=".", command=Dec)
dec.grid(column=2,row=4)equal = Button(window, text="=", command=Equal)
equal.grid(column=3,row=4)add = Button(window, text="+", command=Add)
add.grid(column=4,row=4)window.mainloop()
This looks like this:
I'd like the boxes to be equally wide and fill the available space.
The result should look similar to this:
How do you make a button take up the entire width of the row/column?