title: wx.Frame and threading in the same class
body: <p>I'm trying to create a class that handles wx.Frame and Threading at the same time (I tried to user Visual(threadins.Thread, wx.Frame) too, but I had no success. I really wouldn't want to use wx.CallAfter and I'd like to handle it in one class only. When I run the code, everything works fine, but the Close Method crashes the programand the frame remains open. Where am I wrong?</p>
  
  <pre><code>import threading
  import wx
  
  class Visual(threading.Thread):
      def __init__(self, title):
              screenWidth = 500
              screenHeight = 400
              screenSize = (screenWidth,screenHeight)
              self.app = wx.App(False)
              self.frame = wx.Frame(None, wx.ID_ANY,title, size=screenSize)
              panel = wx.Panel(self.frame)
              self.list_ctrl = wx.ListCtrl(panel, size=(-1,100),
                       style=wx.LC_REPORT
                       |wx.BORDER_SUNKEN
                       )
              self.list_ctrl.InsertColumn(0, 'Name', width=125)
              self.list_ctrl.InsertColumn(1, 'DDD')
              self.list_ctrl.InsertColumn(2, 'Phone')
              self.list_ctrl.InsertColumn(3, 'Desc', width=125)
              sizer = wx.BoxSizer(wx.VERTICAL)
              sizer.Add(self.list_ctrl, 0, wx.ALL|wx.EXPAND, 5)
              panel.SetSizer(sizer)
  
              self.ready = False
  
              threading.Thread.__init__(self)
              self.frame.Bind(wx.EVT_CLOSE, self.close)
              self.start()
      def close(self, event):
          print("Close")
          self.frame.Destroy()
          self.app.Destroy()
          self.app.ExitMainLoop()
  
      def run(self):
              self.frame.Show(True)
              self.ready = True
              self.app.MainLoop()
  if __name__ == '__main__':
     visu = Visual(title='Test')
  </code></pre>
  
  <p>Thanks.</p>