1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
from wxPython.wx import *
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class MyFrame(wxFrame):
|
2001-07-05 02:16:20 +00:00
|
|
|
def __init__(self, parent, ID, title, pos=wxDefaultPosition,
|
|
|
|
size=wxDefaultSize, style=wxDEFAULT_FRAME_STYLE):
|
|
|
|
wxFrame.__init__(self, parent, ID, title, pos, size, style)
|
1999-04-30 03:29:54 +00:00
|
|
|
panel = wxPanel(self, -1)
|
|
|
|
|
|
|
|
button = wxButton(panel, 1003, "Close Me")
|
|
|
|
button.SetPosition(wxPoint(15, 15))
|
|
|
|
EVT_BUTTON(self, 1003, self.OnCloseMe)
|
2000-07-15 19:51:35 +00:00
|
|
|
EVT_CLOSE(self, self.OnCloseWindow)
|
|
|
|
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
def OnCloseMe(self, event):
|
|
|
|
self.Close(true)
|
|
|
|
|
|
|
|
def OnCloseWindow(self, event):
|
|
|
|
self.Destroy()
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
2001-07-05 02:16:20 +00:00
|
|
|
win = MyFrame(frame, -1, "This is a wxFrame", size=(350, 200),
|
2001-07-05 17:27:59 +00:00
|
|
|
style = wxDEFAULT_FRAME_STYLE)# | wxFRAME_TOOL_WINDOW )
|
1999-04-30 03:29:54 +00:00
|
|
|
frame.otherWin = win
|
|
|
|
win.Show(true)
|
|
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overview = """\
|
|
|
|
"""
|