]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxFrame.py
2 from wxPython
.wx
import *
4 #---------------------------------------------------------------------------
6 class MyFrame(wxFrame
):
7 def __init__(self
, parent
, ID
, title
, pos
, size
):
8 wxFrame
.__init
__(self
, parent
, ID
, title
, pos
, size
)
9 panel
= wxPanel(self
, -1)
11 button
= wxButton(panel
, 1003, "Close Me")
12 button
.SetPosition(wxPoint(15, 15))
13 EVT_BUTTON(self
, 1003, self
.OnCloseMe
)
15 def OnCloseMe(self
, event
):
18 def OnCloseWindow(self
, event
):
21 #---------------------------------------------------------------------------
23 def runTest(frame
, nb
, log
):
24 win
= MyFrame(frame
, -1, "This is a wxFrame", wxDefaultPosition
, wxSize(350, 200))
29 #---------------------------------------------------------------------------