2 from wxPython
.wx
import *
4 #---------------------------------------------------------------------------
5 class MyMiniFrame(wxMiniFrame
):
6 def __init__(self
, parent
, ID
, title
, pos
, size
, style
):
7 wxMiniFrame
.__init
__(self
, parent
, ID
, title
, pos
, size
, 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
, -1, "This is a wxMiniFrame",
25 wxDefaultPosition
, wxSize(200, 200),
26 wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ
)
31 #---------------------------------------------------------------------------