X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/493f1553fdfd276ed9944c5f1c070ee34be13b52..78901ea99c705160f7ec8e882e42c4c04896bec2:/wxPython/demo/Sizers.py diff --git a/wxPython/demo/Sizers.py b/wxPython/demo/Sizers.py index 8278bd0db4..0fb4657edc 100644 --- a/wxPython/demo/Sizers.py +++ b/wxPython/demo/Sizers.py @@ -141,11 +141,11 @@ def makeBoxInBox(win): box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND) box2 = wxBoxSizer(wxHORIZONTAL) - box2.AddMany([ (wxButton(win, 1010, "two"), 0, wxEXPAND), - (wxButton(win, 1010, "three"), 0, wxEXPAND), - (wxButton(win, 1010, "four"), 0, wxEXPAND), - (wxButton(win, 1010, "five"), 0, wxEXPAND), - ]) + box2.Add(wxButton(win, 1010, "two"), 0, wxEXPAND) + btn3 = wxButton(win, 1010, "three") + box2.Add(btn3, 0, wxEXPAND) + box2.Add(wxButton(win, 1010, "four"), 0, wxEXPAND) + box2.Add(wxButton(win, 1010, "five"), 0, wxEXPAND) box3 = wxBoxSizer(wxVERTICAL) box3.AddMany([ (wxButton(win, 1010, "six"), 0, wxEXPAND), @@ -159,6 +159,8 @@ def makeBoxInBox(win): box.Add(wxButton(win, 1010, "ten"), 0, wxEXPAND) + ##box.Hide(btn3) + return box #---------------------------------------------------------------------- @@ -479,16 +481,16 @@ class TestFrame(wxFrame): self.SetStatusText("Resize this frame to see how the sizers respond...") self.sizer.Fit(self) - self.SetAutoLayout(true) + self.SetAutoLayout(True) self.SetSizer(self.sizer) EVT_CLOSE(self, self.OnCloseWindow) def OnCloseWindow(self, event): - self.MakeModal(false) + self.MakeModal(False) self.Destroy() def OnButton(self, event): - self.Close(true) + self.Close(True) #---------------------------------------------------------------------- @@ -531,8 +533,8 @@ class TestSelectionPanel(wxPanel): if func: win = TestFrame(self, title, func) win.CentreOnParent(wxBOTH) - win.Show(true) - win.MakeModal(true) + win.Show(True) + win.MakeModal(True) #---------------------------------------------------------------------- @@ -555,12 +557,12 @@ if __name__ == '__main__': def __init__(self): wxFrame.__init__(self, None, -1, "Testing...") - self.CreateStatusBar() - mainmenu = wxMenuBar() - menu = wxMenu() - menu.Append(200, 'E&xit', 'Get the heck outta here!') - mainmenu.Append(menu, "&File") - self.SetMenuBar(mainmenu) + self.CreateStatusBar() + mainmenu = wxMenuBar() + menu = wxMenu() + menu.Append(200, 'E&xit', 'Get the heck outta here!') + mainmenu.Append(menu, "&File") + self.SetMenuBar(mainmenu) EVT_MENU(self, 200, self.OnExit) self.panel = TestSelectionPanel(self, self) self.SetSize(wxSize(400, 380)) @@ -570,15 +572,15 @@ if __name__ == '__main__': self.Destroy() def OnExit(self, event): - self.Close(true) + self.Close(True) class TestApp(wxApp): def OnInit(self): frame = MainFrame() - frame.Show(true) + frame.Show(True) self.SetTopWindow(frame) - return true + return True app = TestApp(0) app.MainLoop()