X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b5d569973c2bf329a666c38e1612ca836695576..9d8bd15f997f3595f6390fcf6a61bd0bf53eedb2:/utils/wxPython/demo/Sizers.py?ds=sidebyside diff --git a/utils/wxPython/demo/Sizers.py b/utils/wxPython/demo/Sizers.py index 9063041a81..0ea2df7807 100644 --- a/utils/wxPython/demo/Sizers.py +++ b/utils/wxPython/demo/Sizers.py @@ -87,6 +87,20 @@ def makeSimpleBox7(win): return box +#---------------------------------------------------------------------- + +def makeSimpleBox8(win): + box = wxBoxSizer(wxVERTICAL) + box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND) + box.Add(0,0, 1) + box.Add(wxButton(win, 1010, "two"), 0, wxCENTER) + 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) + + return box + #---------------------------------------------------------------------- #---------------------------------------------------------------------- @@ -301,6 +315,11 @@ theTests = [ "window or another Sizer." ), + ("Centering in available space", makeSimpleBox8, + "This one shows an item that does not expand to fill it's space, but rather" + "stays centered within it." + ), + # ("Percent Sizer", makeSimpleBox6, # "You can use the wxBoxSizer like a Percent Sizer. Just make sure that all " # "the weighting factors add up to 100!"