title: Why doesn't the .bind() method work with a frame widget in Tkinter?
body: <p>This code is an attempt to bind a command to a frame, ie. when the "Escape" key is pressed, the window should be destroyed.</p>
  
  <pre><code>from tkinter import *
  from tkinter import ttk
  
  root=Tk()
  root.geometry("400x400")
  
  frame1=ttk.Frame(root)
  frame1.pack()
  
  def Exit(event):
      root.destroy()
  
  frame1.bind("&lt;Escape&gt;", Exit)
  
  root.mainloop()
  </code></pre>
  
  <p>if <code>frame1.bind()</code> is replaced by <code>root.bind()</code>, the code works as I would expect it to. Why doesn't what I've written above work?</p>