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