diff --git a/wxPython/demo/Threads.py b/wxPython/demo/Threads.py index ceb2fdc78b..96ef2afd42 100644 --- a/wxPython/demo/Threads.py +++ b/wxPython/demo/Threads.py @@ -211,10 +211,13 @@ class TestPanel(wx.Panel): def OnButton(self, evt): - win = TestFrame(self, self.log) - win.Show(True) + self.win = TestFrame(self, self.log) + self.win.Show(True) + def ShutdownDemo(self): + self.win.Close() + #---------------------------------------------------------------------------