]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/MDIWindows.py
7 #----------------------------------------------------------------------
9 class TestPanel(wx
.Panel
):
10 def __init__(self
, parent
, log
):
12 wx
.Panel
.__init
__(self
, parent
, -1)
14 b1
= wx
.Button(self
, -1, "MDI demo")
15 self
.Bind(wx
.EVT_BUTTON
, self
.ShowMDIDemo
, b1
)
17 b2
= wx
.Button(self
, -1, "MDI with SashWindows demo")
18 self
.Bind(wx
.EVT_BUTTON
, self
.ShowMDISashDemo
, b2
)
20 box
= wx
.BoxSizer(wx
.VERTICAL
)
22 box
.Add(b1
, 0, wx
.ALIGN_CENTER|wx
.ALL
, 15)
23 box
.Add(b2
, 0, wx
.ALIGN_CENTER|wx
.ALL
, 15)
24 self
.SetAutoLayout(True)
28 def ShowMDIDemo(self
, evt
):
29 frame
= MDIDemo
.MyParentFrame()
32 def ShowMDISashDemo(self
, evt
):
33 frame
= MDISashDemo
.MyParentFrame()
38 #----------------------------------------------------------------------
40 def runTest(frame
, nb
, log
):
41 win
= TestPanel(nb
, log
)
44 #----------------------------------------------------------------------
48 overview
= """<html><body>
49 <h2><center>Multiple Document Interface</center></h2>
51 Although Microsoft has deprecated the MDI model, wxWindows still supports
52 it. Here are a couple samples of how to use it - one straightforward, the other
53 showing how the MDI interface can be integrated into a SashWindow interface.
59 if __name__
== '__main__':
62 run
.main(['', os
.path
.basename(sys
.argv
[0])] + sys
.argv
[1:])