]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxMDIWindows.py
fix text scrolling in GTK2 (patch 703988)
[wxWidgets.git] / wxPython / demo / wxMDIWindows.py
CommitLineData
9c67cbec
RD
1
2from wxPython.wx import *
3
4#----------------------------------------------------------------------
5
6class 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)
1e4a197e 21 self.SetAutoLayout(True)
9c67cbec
RD
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
39def runTest(frame, nb, log):
40 win = TestPanel(nb, log)
41 return win
42
43#----------------------------------------------------------------------
44
45
46
47overview = """<html><body>
48<h2><center>Multiple Document Interface</center></h2>
49
50Although Microsoft has deprecated the MDI model, wxWindows still supports
51it. Here are a couple samples of how to use it.
52
53</body></html>
54"""
1fded56b
RD
55
56
57
58
59
60if __name__ == '__main__':
61 import sys,os
62 import run
63 run.main(['', os.path.basename(sys.argv[0])])