title: Python, Tkinter - What happens when you set the size of a window by geometry() that its size will no longer change with elements' size on it?
body: <p>When you create a new widget and put it up on a window using <code>grid</code> or demolish one using say <code>grid_forget</code> then the containing window's dimension grows or shrinks respectively depending on the size of newly added or deleted widget.
  But when you set the size of containing window to a specific amount using <code>geometry()</code> then above actions will not affect the size of the containing window anymore.</p>
  
  <p>Is there any trick to make containing window's size responsive again (based on its elements' size) after you had set manually its size once?</p>
  
  <p>take a look at below slip of code:</p>
  
  <pre><code>import Tkinter
  
  def func1():
      l1.destroy()
      w.update()
      print w.winfo_width(), "x", w.winfo_height()
  
  def func2():
      print w.geometry(str(w.winfo_width()+10)+"x"+str(w.winfo_height()+10))
  
  w=Tkinter.Tk()
  
  l1=Tkinter.Label(w, width=20, borderwidth=2, relief="solid", text='             ')
  l2=Tkinter.Label(w, width=20, borderwidth=2, relief="solid", text='             ')
  c=Tkinter.Button(w, text="clik", command=func1)
  c2=Tkinter.Button(w, text="clik2", command=func2)
  
  l1.grid(row=1, column=0)
  l2.grid(row=1, column=1)
  c.grid(row=0, column=1)
  c2.grid(row=2, column=1)
  w.columnconfigure(0, weight=1)
  w.columnconfigure(1, weight=1)
  
  w.mainloop()
  </code></pre>
  
  <p>If you first clicked on <code>c</code> button the <code>w</code> window would shrink after <code>l1</code> label disappeared. 
  But if you first clicked on <code>c2</code> button (assigning a new value explicitly with <code>geometry</code>) size would become constant and no longer change with size of widgets on it (click on <code>c1</code> would not change window size based on remaining widgets).</p>