1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
from wxPython.wx import *
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class MyMiniFrame(wxMiniFrame):
|
2001-11-20 17:04:15 +00:00
|
|
|
def __init__(self, parent, title, pos=wxDefaultPosition, size=wxDefaultSize,
|
|
|
|
style=wxDEFAULT_FRAME_STYLE ):
|
|
|
|
wxMiniFrame.__init__(self, parent, -1, title, pos, size, style)
|
1999-04-30 03:29:54 +00:00
|
|
|
panel = wxPanel(self, -1)
|
|
|
|
|
2001-11-20 17:04:15 +00:00
|
|
|
button = wxButton(panel, -1, "Close Me")
|
1999-04-30 03:29:54 +00:00
|
|
|
button.SetPosition(wxPoint(15, 15))
|
2001-11-20 17:04:15 +00:00
|
|
|
EVT_BUTTON(self, button.GetId(), 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-11-20 07:40:06 +00:00
|
|
|
win = MyMiniFrame(frame, "This is a wxMiniFrame",
|
2001-11-20 17:04:15 +00:00
|
|
|
#pos=(250,250), size=(200,200),
|
|
|
|
style=wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ)
|
2001-11-20 07:40:06 +00:00
|
|
|
win.SetSize((200, 200))
|
|
|
|
win.CenterOnParent(wxBOTH)
|
1999-04-30 03:29:54 +00:00
|
|
|
frame.otherWin = win
|
|
|
|
win.Show(true)
|
|
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overview = """\
|
|
|
|
"""
|