]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-08/mdi.py
3 class MDIFrame(wx
.MDIParentFrame
):
5 wx
.MDIParentFrame
.__init
__(self
, None, -1, "MDI Parent",
8 menu
.Append(5000, "&New Window")
9 menu
.Append(5001, "E&xit")
10 menubar
= wx
.MenuBar()
11 menubar
.Append(menu
, "&File")
12 self
.SetMenuBar(menubar
)
13 self
.Bind(wx
.EVT_MENU
, self
.OnNewWindow
, id=5000)
14 self
.Bind(wx
.EVT_MENU
, self
.OnExit
, id=5001)
16 def OnExit(self
, evt
):
19 def OnNewWindow(self
, evt
):
20 win
= wx
.MDIChildFrame(self
, -1, "Child Window")
23 if __name__
== '__main__':
24 app
= wx
.PySimpleApp()