]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxMDIWindows.py
Added XML simplification scripts for generating the wxPython metadata xml.
[wxWidgets.git] / wxPython / demo / wxMDIWindows.py
1 # 11/12/2003 - Jeff Grimmett (grimmtooth@softhome.net)
2 #
3 # o Updated for wx namespace
4 #
5
6 import wx
7
8 import MDIDemo
9 import MDISashDemo
10
11 #----------------------------------------------------------------------
12
13 class TestPanel(wx.Panel):
14 def __init__(self, parent, log):
15 self.log = log
16 wx.Panel.__init__(self, parent, -1)
17
18 b1 = wx.Button(self, -1, "MDI demo")
19 self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b1)
20
21 b2 = wx.Button(self, -1, "MDI with SashWindows demo")
22 self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b2)
23
24 box = wx.BoxSizer(wx.VERTICAL)
25 box.Add((20, 30))
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)
29 self.SetSizer(box)
30
31
32 def ShowMDIDemo(self, evt):
33 frame = MDIDemo.MyParentFrame()
34 frame.Show()
35
36 def ShowMDISashDemo(self, evt):
37 frame = MDISashDemo.MyParentFrame()
38 frame.Show()
39
40
41
42 #----------------------------------------------------------------------
43
44 def runTest(frame, nb, log):
45 win = TestPanel(nb, log)
46 return win
47
48 #----------------------------------------------------------------------
49
50
51
52 overview = """<html><body>
53 <h2><center>Multiple Document Interface</center></h2>
54
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.
58
59 </body></html>
60 """
61
62
63 if __name__ == '__main__':
64 import sys,os
65 import run
66 run.main(['', os.path.basename(sys.argv[0])])