def destroy(self): "This is used for destroying whole windows from the application." for component in self.contents: self.remove(component) component.destroy() Component.destroy(self)