title: How to close a tkinter window when button pressed?
body: <pre><code>def _error_message(self, message: str):
      self._error_window = tkinter.Toplevel()
      title = tkinter.Label(master = self._error_window,
          text = message, font = DEFAULT)
      title.grid(row = 0, padx = 12, pady = 12, sticky = tkinter.EW)
  
      ok_error_button = tkinter.Button(master=self._error_window, text='OK',
          font= DEFAULT, command = self._error_window.destroy())
      ok_error_button.grid(row = 1, padx = 10, pady = 10)
  
      self._error_window.grab_set()
  </code></pre>
  
  <p>I want to make pressing the "ok" button on a window close a window how do I do that?</p>