]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxMDIWindows.py
1 # 11/12/2003 - Jeff Grimmett (grimmtooth@softhome.net)
3 # o Updated for wx namespace
11 #----------------------------------------------------------------------
13 class TestPanel(wx
.Panel
):
14 def __init__(self
, parent
, log
):
16 wx
.Panel
.__init
__(self
, parent
, -1)
18 b1
= wx
.Button(self
, -1, "MDI demo")
19 self
.Bind(wx
.EVT_BUTTON
, self
.ShowMDIDemo
, b1
)
21 b2
= wx
.Button(self
, -1, "MDI with SashWindows demo")
22 self
.Bind(wx
.EVT_BUTTON
, self
.ShowMDIDemo
, b2
)
24 box
= wx
.BoxSizer(wx
.VERTICAL
)
26 box
.Add(b1
, 0, wx
.ALIGN_CENTER|wx
.ALL
, 15)
27 box
.Add(b2
, 0, wx
.ALIGN_CENTER|wx
.ALL
, 15)
28 self
.SetAutoLayout(True)
32 def ShowMDIDemo(self
, evt
):
33 frame
= MDIDemo
.MyParentFrame()
36 def ShowMDISashDemo(self
, evt
):
37 frame
= MDISashDemo
.MyParentFrame()
42 #----------------------------------------------------------------------
44 def runTest(frame
, nb
, log
):
45 win
= TestPanel(nb
, log
)
48 #----------------------------------------------------------------------
52 overview
= """<html><body>
53 <h2><center>Multiple Document Interface</center></h2>
55 Although Microsoft has deprecated the MDI model, wxWindows still supports
56 it. Here are a couple samples of how to use it - one straightforward, the other
57 showing how the MDI interface can be integrated into a SashWindow interface.
63 if __name__
== '__main__':
66 run
.main(['', os
.path
.basename(sys
.argv
[0])])