]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/MDIWindows.py
fixed wxSetEnv to correctly set variable in Unicode build
[wxWidgets.git] / wxPython / demo / MDIWindows.py
1
2 import wx
3
4 import MDIDemo
5 import MDISashDemo
6
7 #----------------------------------------------------------------------
8
9 class TestPanel(wx.Panel):
10 def __init__(self, parent, log):
11 self.log = log
12 wx.Panel.__init__(self, parent, -1)
13
14 b1 = wx.Button(self, -1, "MDI demo")
15 self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b1)
16
17 b2 = wx.Button(self, -1, "MDI with SashWindows demo")
18 self.Bind(wx.EVT_BUTTON, self.ShowMDISashDemo, b2)
19
20 box = wx.BoxSizer(wx.VERTICAL)
21 box.Add((20, 30))
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)
25 self.SetSizer(box)
26
27
28 def ShowMDIDemo(self, evt):
29 frame = MDIDemo.MyParentFrame()
30 frame.Show()
31
32 def ShowMDISashDemo(self, evt):
33 frame = MDISashDemo.MyParentFrame()
34 frame.Show()
35
36
37
38 #----------------------------------------------------------------------
39
40 def runTest(frame, nb, log):
41 win = TestPanel(nb, log)
42 return win
43
44 #----------------------------------------------------------------------
45
46
47
48 overview = """<html><body>
49 <h2><center>Multiple Document Interface</center></h2>
50
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.
54
55 </body></html>
56 """
57
58
59 if __name__ == '__main__':
60 import sys,os
61 import run
62 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])