]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxMDIWindows.py
reSWIGged
[wxWidgets.git] / wxPython / demo / wxMDIWindows.py
CommitLineData
8fa876ca
RD
1# 11/12/2003 - Jeff Grimmett (grimmtooth@softhome.net)
2#
3# o Updated for wx namespace
4#
9c67cbec 5
8fa876ca
RD
6import wx
7
8import MDIDemo
9import MDISashDemo
9c67cbec
RD
10
11#----------------------------------------------------------------------
12
8fa876ca 13class TestPanel(wx.Panel):
9c67cbec
RD
14 def __init__(self, parent, log):
15 self.log = log
8fa876ca 16 wx.Panel.__init__(self, parent, -1)
9c67cbec 17
8fa876ca
RD
18 b1 = wx.Button(self, -1, "MDI demo")
19 self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b1)
9c67cbec 20
8fa876ca
RD
21 b2 = wx.Button(self, -1, "MDI with SashWindows demo")
22 self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b2)
9c67cbec 23
8fa876ca 24 box = wx.BoxSizer(wx.VERTICAL)
d14a1e28 25 box.Add((20, 30))
8fa876ca
RD
26 box.Add(b1, 0, wx.ALIGN_CENTER|wx.ALL, 15)
27 box.Add(b2, 0, wx.ALIGN_CENTER|wx.ALL, 15)
1e4a197e 28 self.SetAutoLayout(True)
9c67cbec
RD
29 self.SetSizer(box)
30
31
32 def ShowMDIDemo(self, evt):
9c67cbec
RD
33 frame = MDIDemo.MyParentFrame()
34 frame.Show()
35
36 def ShowMDISashDemo(self, evt):
9c67cbec
RD
37 frame = MDISashDemo.MyParentFrame()
38 frame.Show()
39
40
41
42#----------------------------------------------------------------------
43
44def runTest(frame, nb, log):
45 win = TestPanel(nb, log)
46 return win
47
48#----------------------------------------------------------------------
49
50
51
52overview = """<html><body>
53<h2><center>Multiple Document Interface</center></h2>
54
55Although Microsoft has deprecated the MDI model, wxWindows still supports
8fa876ca
RD
56it. Here are a couple samples of how to use it - one straightforward, the other
57showing how the MDI interface can be integrated into a SashWindow interface.
9c67cbec
RD
58
59</body></html>
60"""
1fded56b
RD
61
62
1fded56b
RD
63if __name__ == '__main__':
64 import sys,os
65 import run
66 run.main(['', os.path.basename(sys.argv[0])])