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
)
14 def OnCloseMe(self
, event
):
17 def OnCloseWindow(self
, event
):
20 #---------------------------------------------------------------------------
22 def runTest(frame
, nb
, log
):
23 win
= MyMiniFrame(frame
, -1, "This is a wxMiniFrame",
24 wxDefaultPosition
, wxSize(200, 200),
25 wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ
)
30 #---------------------------------------------------------------------------