1999-04-29 23:29:54 -04:00
|
|
|
|
|
|
|
from wxPython.wx import *
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class MyMiniFrame(wxMiniFrame):
|
2001-11-20 12:04:15 -05: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-29 23:29:54 -04:00
|
|
|
panel = wxPanel(self, -1)
|
|
|
|
|
2001-11-20 12:04:15 -05:00
|
|
|
button = wxButton(panel, -1, "Close Me")
|
1999-04-29 23:29:54 -04:00
|
|
|
button.SetPosition(wxPoint(15, 15))
|
2001-11-20 12:04:15 -05:00
|
|
|
EVT_BUTTON(self, button.GetId(), self.OnCloseMe)
|
2000-07-15 15:51:35 -04:00
|
|
|
EVT_CLOSE(self, self.OnCloseWindow)
|
1999-04-29 23:29:54 -04:00
|
|
|
|
|
|
|
def OnCloseMe(self, event):
|
|
|
|
self.Close(true)
|
|
|
|
|
|
|
|
def OnCloseWindow(self, event):
|
|
|
|
self.Destroy()
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
2001-11-20 02:40:06 -05:00
|
|
|
win = MyMiniFrame(frame, "This is a wxMiniFrame",
|
2001-11-20 12:04:15 -05:00
|
|
|
#pos=(250,250), size=(200,200),
|
|
|
|
style=wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ)
|
2001-11-20 02:40:06 -05:00
|
|
|
win.SetSize((200, 200))
|
|
|
|
win.CenterOnParent(wxBOTH)
|
1999-04-29 23:29:54 -04:00
|
|
|
frame.otherWin = win
|
|
|
|
win.Show(true)
|
|
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overview = """\
|
|
|
|
"""
|