X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e4a197e4c60e461b8068b0619692ea083e30b8b..9e58eb5674cfac859568c9a4b1030012e1f0eb64:/wxPython/demo/wxMDIWindows.py diff --git a/wxPython/demo/wxMDIWindows.py b/wxPython/demo/wxMDIWindows.py index 7eef8a39c9..4478165dea 100644 --- a/wxPython/demo/wxMDIWindows.py +++ b/wxPython/demo/wxMDIWindows.py @@ -1,34 +1,39 @@ +# 11/12/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o Updated for wx namespace +# -from wxPython.wx import * +import wx + +import MDIDemo +import MDISashDemo #---------------------------------------------------------------------- -class TestPanel(wxPanel): +class TestPanel(wx.Panel): def __init__(self, parent, log): self.log = log - wxPanel.__init__(self, parent, -1) + wx.Panel.__init__(self, parent, -1) - b1 = wxButton(self, -1, "MDI demo") - EVT_BUTTON(self, b1.GetId(), self.ShowMDIDemo) + b1 = wx.Button(self, -1, "MDI demo") + self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b1) - b2 = wxButton(self, -1, "MDI with SashWindows demo") - EVT_BUTTON(self, b2.GetId(), self.ShowMDISashDemo) + b2 = wx.Button(self, -1, "MDI with SashWindows demo") + self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b2) - box = wxBoxSizer(wxVERTICAL) - box.Add(20, 30) - box.Add(b1, 0, wxALIGN_CENTER|wxALL, 15) - box.Add(b2, 0, wxALIGN_CENTER|wxALL, 15) + box = wx.BoxSizer(wx.VERTICAL) + box.Add((20, 30)) + box.Add(b1, 0, wx.ALIGN_CENTER|wx.ALL, 15) + box.Add(b2, 0, wx.ALIGN_CENTER|wx.ALL, 15) self.SetAutoLayout(True) self.SetSizer(box) def ShowMDIDemo(self, evt): - import MDIDemo frame = MDIDemo.MyParentFrame() frame.Show() def ShowMDISashDemo(self, evt): - import MDISashDemo frame = MDISashDemo.MyParentFrame() frame.Show() @@ -48,7 +53,14 @@ overview = """