]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxMDIWindows.py
2 from wxPython
.wx
import *
4 #----------------------------------------------------------------------
6 class TestPanel(wxPanel
):
7 def __init__(self
, parent
, log
):
9 wxPanel
.__init
__(self
, parent
, -1)
11 b1
= wxButton(self
, -1, "MDI demo")
12 EVT_BUTTON(self
, b1
.GetId(), self
.ShowMDIDemo
)
14 b2
= wxButton(self
, -1, "MDI with SashWindows demo")
15 EVT_BUTTON(self
, b2
.GetId(), self
.ShowMDISashDemo
)
17 box
= wxBoxSizer(wxVERTICAL
)
19 box
.Add(b1
, 0, wxALIGN_CENTER|wxALL
, 15)
20 box
.Add(b2
, 0, wxALIGN_CENTER|wxALL
, 15)
21 self
.SetAutoLayout(true
)
25 def ShowMDIDemo(self
, evt
):
27 frame
= MDIDemo
.MyParentFrame()
30 def ShowMDISashDemo(self
, evt
):
32 frame
= MDISashDemo
.MyParentFrame()
37 #----------------------------------------------------------------------
39 def runTest(frame
, nb
, log
):
40 win
= TestPanel(nb
, log
)
43 #----------------------------------------------------------------------
47 overview
= """<html><body>
48 <h2><center>Multiple Document Interface</center></h2>
50 Although Microsoft has deprecated the MDI model, wxWindows still supports
51 it. Here are a couple samples of how to use it.