X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8fa876ca9ec87e90605808bfcab4d4226965dbad..3cebfef17b54f9dacc386f090827b8badb2773d2:/wxPython/demo/Sizers.py diff --git a/wxPython/demo/Sizers.py b/wxPython/demo/Sizers.py index 252a635776..ef222514f7 100644 --- a/wxPython/demo/Sizers.py +++ b/wxPython/demo/Sizers.py @@ -1,8 +1,3 @@ -# 11/13/2003 - Jeff Grimmett (grimmtooth@softhome.net) -# -# o Updated for wx namespace -# o Issues exist that will probably need to be addressed in the 2.5 build. -# # 11/26/2003 - Jeff Grimmett (grimmtooth@softhome.net) # # o Had to do a bit of rework for the demo; there was no panel attached @@ -91,26 +86,26 @@ def makeSimpleBox6(win): #---------------------------------------------------------------------- def makeSimpleBox7(win): - box = wxBoxSizer(wxHORIZONTAL) - box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND) - box.Add(wxButton(win, 1010, "two"), 0, wxEXPAND) - box.Add(wxButton(win, 1010, "three"), 0, wxEXPAND) - box.Add((60, 20), 0, wxEXPAND) - box.Add(wxButton(win, 1010, "five"), 1, wxEXPAND) + box = wx.BoxSizer(wx.HORIZONTAL) + box.Add(wx.Button(win, 1010, "one"), 0, wx.EXPAND) + box.Add(wx.Button(win, 1010, "two"), 0, wx.EXPAND) + box.Add(wx.Button(win, 1010, "three"), 0, wx.EXPAND) + box.Add((60, 20), 0, wx.EXPAND) + box.Add(wx.Button(win, 1010, "five"), 1, wx.EXPAND) return box #---------------------------------------------------------------------- def makeSimpleBox8(win): - box = wxBoxSizer(wxVERTICAL) - box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND) + box = wx.BoxSizer(wx.VERTICAL) + box.Add(wx.Button(win, 1010, "one"), 0, wx.EXPAND) box.Add((0,0), 1) - box.Add(wxButton(win, 1010, "two"), 0, wxALIGN_CENTER) + box.Add(wx.Button(win, 1010, "two"), 0, wx.ALIGN_CENTER) box.Add((0,0), 1) - box.Add(wxButton(win, 1010, "three"), 0, wxEXPAND) - box.Add(wxButton(win, 1010, "four"), 0, wxEXPAND) -# box.Add(wxButton(win, 1010, "five"), 1, wxEXPAND) + box.Add(wx.Button(win, 1010, "three"), 0, wx.EXPAND) + box.Add(wx.Button(win, 1010, "four"), 0, wx.EXPAND) +# box.Add(wx.Button(win, 1010, "five"), 1, wx.EXPAND) return box @@ -276,7 +271,7 @@ def makeGrid3(win): (wx.Button(win, -1, 'two'), 0, wx.EXPAND), (wx.Button(win, -1, 'three'), 0, wx.EXPAND), (wx.Button(win, -1, 'four'), 0, wx.EXPAND), - #(wxButton(win, 1010, 'five'), 0, wxEXPAND), + #(wx.Button(win, 1010, 'five'), 0, wx.EXPAND), ((175, 50)), (wx.Button(win, -1, 'six'), 0, wx.EXPAND), (wx.Button(win, -1, 'seven'), 0, wx.EXPAND), @@ -445,14 +440,14 @@ theTests = [ ("", None, ""), ("Simple Grid", makeGrid1, - "This is an example of the wxGridSizer. In this case all row heights " + "This is an example of the wx.GridSizer. In this case all row heights " "and column widths are kept the same as all the others and all items " "fill their available space. The horizontal and vertical gaps are set to " "2 pixels each." ), ("More Grid Features", makeGrid2, - "This is another example of the wxGridSizer. This one has no gaps in the grid, " + "This is another example of the wx.GridSizer. This one has no gaps in the grid, " "but various cells are given different alignment options and some of them " "hold nested sizers." ), @@ -474,7 +469,7 @@ theTests = [ ("Proportional resize", makeSimpleBoxShaped, "Managed items can preserve their original aspect ratio. The last item has the " - "wxSHAPED flag set and will resize proportional to its original size." + "wx.SHAPED flag set and will resize proportional to its original size." ), ("Proportional resize with Alignments", makeShapes, @@ -558,9 +553,6 @@ def runTest(frame, nb, log): return win overview = "" -#wxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \ -#wxBoxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \ -#wxBorderSizer.__doc__ #----------------------------------------------------------------------