]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxMDIWindows.py
added comments to the makefile; added WX_CONFIG var to be able to use a different...
[wxWidgets.git] / wxPython / demo / wxMDIWindows.py
1
2 from wxPython.wx import *
3
4 #----------------------------------------------------------------------
5
6 class TestPanel(wxPanel):
7 def __init__(self, parent, log):
8 self.log = log
9 wxPanel.__init__(self, parent, -1)
10
11 b1 = wxButton(self, -1, "MDI demo")
12 EVT_BUTTON(self, b1.GetId(), self.ShowMDIDemo)
13
14 b2 = wxButton(self, -1, "MDI with SashWindows demo")
15 EVT_BUTTON(self, b2.GetId(), self.ShowMDISashDemo)
16
17 box = wxBoxSizer(wxVERTICAL)
18 box.Add(20, 30)
19 box.Add(b1, 0, wxALIGN_CENTER|wxALL, 15)
20 box.Add(b2, 0, wxALIGN_CENTER|wxALL, 15)
21 self.SetAutoLayout(True)
22 self.SetSizer(box)
23
24
25 def ShowMDIDemo(self, evt):
26 import MDIDemo
27 frame = MDIDemo.MyParentFrame()
28 frame.Show()
29
30 def ShowMDISashDemo(self, evt):
31 import MDISashDemo
32 frame = MDISashDemo.MyParentFrame()
33 frame.Show()
34
35
36
37 #----------------------------------------------------------------------
38
39 def runTest(frame, nb, log):
40 win = TestPanel(nb, log)
41 return win
42
43 #----------------------------------------------------------------------
44
45
46
47 overview = """<html><body>
48 <h2><center>Multiple Document Interface</center></h2>
49
50 Although Microsoft has deprecated the MDI model, wxWindows still supports
51 it. Here are a couple samples of how to use it.
52
53 </body></html>
54 """
55
56
57
58
59
60 if __name__ == '__main__':
61 import sys,os
62 import run
63 run.main(['', os.path.basename(sys.argv[0])])