2 from wxPython
.wx
import *
4 #---------------------------------------------------------------------------
5 class MyMiniFrame(wxMiniFrame
):
6 def __init__(self
, parent
, title
, style
):
7 wxMiniFrame
.__init
__(self
, parent
, -1, title
, style
=style
)
8 panel
= wxPanel(self
, -1)
10 button
= wxButton(panel
, 1003, "Close Me")
11 button
.SetPosition(wxPoint(15, 15))
12 EVT_BUTTON(self
, 1003, self
.OnCloseMe
)
13 EVT_CLOSE(self
, self
.OnCloseWindow
)
15 def OnCloseMe(self
, event
):
18 def OnCloseWindow(self
, event
):
21 #---------------------------------------------------------------------------
23 def runTest(frame
, nb
, log
):
24 win
= MyMiniFrame(frame
, "This is a wxMiniFrame",
25 wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ
)
26 win
.SetSize((200, 200))
27 win
.CenterOnParent(wxBOTH
)
32 #---------------------------------------------------------------------------