10 |
|
|
11 |
__version__ = "$Revision$" |
__version__ = "$Revision$" |
12 |
|
|
|
from wxPython.wx import wxFrame, wxDEFAULT_FRAME_STYLE, EVT_CLOSE |
|
|
|
|
|
#class NonModalDialog(wxFrame): |
|
|
# |
|
|
# def __init__(self, parent, name, title): |
|
|
# wxFrame.__init__(self, parent, -1, title, |
|
|
# style = wxDEFAULT_FRAME_STYLE ) |
|
|
# self.parent = parent |
|
|
# self.name = name |
|
|
# EVT_CLOSE(self, self.OnClose) |
|
|
# |
|
|
# def OnClose(self, event): |
|
|
# self.parent.remove_dialog(self.name) |
|
|
# self.Destroy() |
|
|
# |
|
13 |
from wxPython.wx import * |
from wxPython.wx import * |
14 |
|
|
15 |
|
class ThubanFrame(wxFrame): |
16 |
|
|
17 |
|
def __init__(self, parent, name, title): |
18 |
|
wxFrame.__init__(self, parent, -1, title, |
19 |
|
style = wxDEFAULT_FRAME_STYLE ) |
20 |
|
self.parent = parent |
21 |
|
self.name = name |
22 |
|
EVT_CLOSE(self, self.OnClose) |
23 |
|
|
24 |
|
def OnClose(self, event): |
25 |
|
if self.parent.dialogs.has_key(self.name): |
26 |
|
self.parent.remove_dialog(self.name) |
27 |
|
self.Destroy() |
28 |
|
|
29 |
class NonModalDialog(wxDialog): |
class NonModalDialog(wxDialog): |
30 |
def __init__(self, parent, name, title): |
def __init__(self, parent, name, title): |
31 |
wxDialog.__init__(self, parent, -1, title, |
wxDialog.__init__(self, parent, -1, title, |