]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-02/insert.py
5 class InsertFrame(wx
.Frame
):
7 def __init__(self
, parent
, id):
8 wx
.Frame
.__init
__(self
, parent
, id, 'Frame With Button',
10 panel
= wx
.Panel(self
)
11 button
= wx
.Button(panel
, label
="Close", pos
=(125, 10),
13 self
.Bind(wx
.EVT_BUTTON
, self
.OnCloseMe
, button
)
14 self
.Bind(wx
.EVT_CLOSE
, self
.OnCloseWindow
)
16 def OnCloseMe(self
, event
):
19 def OnCloseWindow(self
, event
):
22 if __name__
== '__main__':
23 app
= wx
.PySimpleApp()
24 frame
= InsertFrame(parent
=None, id=-1)