]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-11/resizegridsizer.py
2 from blockwindow
import BlockWindow
4 labels
= "one two three four five six seven eight nine".split()
5 flags
= {"one": wx
.ALIGN_BOTTOM
, "two": wx
.ALIGN_CENTER
,
6 "four": wx
.ALIGN_RIGHT
, "six": wx
.EXPAND
, "seven": wx
.EXPAND
,
9 class TestFrame(wx
.Frame
):
11 wx
.Frame
.__init
__(self
, None, -1, "GridSizer Resizing")
12 sizer
= wx
.GridSizer(rows
=3, cols
=3, hgap
=5, vgap
=5)
14 bw
= BlockWindow(self
, label
=label
)
15 flag
= flags
.get(label
, 0)
16 sizer
.Add(bw
, 0, flag
)
20 app
= wx
.PySimpleApp()