title: How am I suppose to get the width and height of a Frame in Python
body: <p>In my python code, I am trying to make the width of my button the same as the width of the Frame it is in. The Frame's width changes when the window is resized. I tried <code>Widget['width']</code> and <code>Widget.winfo_width()</code> but both of them give me errors.
  My code:</p>
  <pre><code>from tkinter import *
  
  root = Tk()
  root.geometry('750x500')
  root.minsize(750, 500)
  
  
  # Frames
  Screen = Frame(root, height=500, width=500, bg='pink').grid(row=0, column=0, sticky='nsew', rowspan=4)
  root.grid_columnconfigure(0, weight=3)
  Buttons = Frame(root, height=500, width=100, bg=&quot;blue&quot;).grid(row=0, column=1, sticky='nsew', rowspan=4, columnspan=2)
  root.grid_columnconfigure(2, weight=1)
  root.grid_rowconfigure(3, weight=1)
  
  # Buttons
  UpgradeBtn = Button(Buttons, text=&quot;Upgrades&quot;)
  UpgradeBtn.grid(row=0, column=1, columnspan=2)
  WallBreakBtn = Button(Buttons, text=&quot;Wall Breaking&quot;)
  WallBreakBtn.grid(row=1, column=1, columnspan=2)
  
  
  root.mainloop()
  </code></pre>
  <p>Could you help me?</p>