]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/MDIWindows.py
Simplified and extended compiler detection for OS/2.
[wxWidgets.git] / wxPython / demo / MDIWindows.py
... / ...
CommitLineData
1
2import wx
3
4import MDIDemo
5import MDISashDemo
6
7#----------------------------------------------------------------------
8
9class 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
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
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.
54
55</body></html>
56"""
57
58
59if __name__ == '__main__':
60 import sys,os
61 import run
62 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])