title: How to make tkinter button widget take up full width of grid
body: <p>I've tried <a href="https://stackoverflow.com/questions/24945467/python-tkinter-set-entry-grid-width-100">this</a> but it didn't help.</p>
  <p>I'm making a calculator program. I've made this so far:</p>
  <pre><code>from tkinter import *
  window = Tk()
  
  disp = Entry(window, state='readonly', readonlybackground=&quot;white&quot;)
  disp.grid(column=0, row=0, columnspan=4)
  #row 1
  seven = Button(window, text=&quot;7&quot;, command=Seven)
  seven.grid(column=1,row=1)
  
  eight = Button(window, text=&quot;8&quot;, command=Eight)
  eight.grid(column=2,row=1)
  
  nine = Button(window, text=&quot;9&quot;, command=Nine)
  nine.grid(column=3,row=1)
  
  divide = Button(window, text=&quot;÷&quot;, command=Divide)
  divide.grid(column=4,row=1)
  
  #row 2
  
  four = Button(window, text=&quot;4&quot;, command=Four)
  four.grid(column=1,row=2)
  
  five = Button(window, text=&quot;5&quot;, command=Five)
  five.grid(column=2,row=2)
  
  six = Button(window, text=&quot;6&quot;, command=Six)
  six.grid(column=3,row=2)
  
  multiply = Button(window, text=&quot;×&quot;, command=Multiply)
  multiply.grid(column=4,row=2)
  
  #row 3
  
  one = Button(window, text=&quot;1&quot;, command=One)
  one.grid(column=1,row=3)
  
  two = Button(window, text=&quot;2&quot;, command=Two)
  two.grid(column=2,row=3)
  
  three = Button(window, text=&quot;3&quot;, command=Three)
  three.grid(column=3,row=3)
  
  minus = Button(window, text=&quot;-&quot;, command=Minus)
  minus.grid(column=4,row=3)
  
  #row 4
  
  zero = Button(window, text=&quot;0&quot;, command=Zero)
  zero.grid(column=1,row=4)
  
  dec = Button(window, text=&quot;.&quot;, command=Dec)
  dec.grid(column=2,row=4)
  
  equal = Button(window, text=&quot;=&quot;, command=Equal)
  equal.grid(column=3,row=4)
  
  add = Button(window, text=&quot;+&quot;, command=Add)
  add.grid(column=4,row=4)
  
  window.mainloop()
  </code></pre>
  <p>This looks like this: <br>
  <a href="https://i.stack.imgur.com/OXm72.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OXm72.jpg" alt="Calculator with broken buttons" /></a></p>
  <p>I'd like the boxes to be equally wide and fill the available space.
  The result should look similar to this:<br>
  <a href="https://i.stack.imgur.com/Hl2oI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hl2oI.png" alt="Calculator with fixed buttons" /></a></p>
  <p>How do you make a button take up the entire width of the row/column?</p>