(self)
Destroy window
Destroy window
Destroy window
def destroy(self):
        """Destroy window"""
        if self.closed:
            return
        self.closed = True
        while self.children:
            self.children[0].destroy()

        if self.parent:
            self.parent.children.remove(self)
        self.parent = None
        self._cwnd = self._panel = None

        if kaa.app.focus is self:
            kaa.app.focus = None
def destroy ( self ) : if self . closed : return self . closed = True while self . children : self . children [ 0 ] . destroy ( ) if self . parent : self . parent . children . remove ( self ) self . parent = None self . _cwnd = self . _panel = None if kaa . app . focus is self : kaa . app . focus = None