code: def cancel(self, event=None):
          
  
          if self.parent != None:
              self.parent.focus_set()
  
          self.destroy()
docs: Function called when Cancel-button clicked.
  
          This method returns focus to parent, and destroys the dialog.