title: Tkinter: How do I remove padding after maximize (where two frames resize to fit the window's resize)?
body: <p>Note: This is a q/a question where I answer my own question in an answer, merely for the benefit of others (or so that people who know a better way than what I provide can provide it).</p>
  
  <p>In the following example, how do I make the bottom <code>Text</code> widget fill up all the empty space that appears when you maximize the screen (and so the top <code>Text</code> widget is directly at the top after maximizing)? I don't know a reason for that extra padding. I can get rid of some of the padding by adding extra rows for the second <code>Text</code> widget to fill and using <code>rowspan</code>, but there's still some left. I do not want the top <code>Text</code> widget to have a height greater than 1.</p>
  
  <pre><code>from tkinter import *
  
  tk=Tk()
  
  tk.columnconfigure(0, weight=1)
  tk.rowconfigure(0, weight=1)
  tk.rowconfigure(1, weight=1)
  
  f=Frame(tk)
  f2=Frame(tk)
  
  f.grid(row=0, column=0, sticky=E+W)
  f2.grid(row=1, column=0, sticky=N+S+E+W)
  
  t=Text(f, height=1)
  t2=Text(f2)
  l=Label(f, text="label")
  b=Button(f, text="button")
  
  l.pack(side=LEFT)
  t.pack(side=LEFT, fill=X, expand=True)
  b.pack(side=LEFT)
  t2.pack(fill=BOTH, expand=True)
  
  tk.mainloop()
  </code></pre>