]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-11/bordergridsizer.py
2 from blockwindow
import BlockWindow
4 labels
= "one two three four five six seven eight nine".split()
5 flags
= {"one": wx
.BOTTOM
, "two": wx
.ALL
, "three": wx
.TOP
,
6 "four": wx
.LEFT
, "five": wx
.ALL
, "six": wx
.RIGHT
,
7 "seven": wx
.BOTTOM | wx
.TOP
, "eight": wx
.ALL
,
8 "nine": wx
.LEFT | wx
.RIGHT
}
10 class TestFrame(wx
.Frame
):
12 wx
.Frame
.__init
__(self
, None, -1, "GridSizer Borders")
13 sizer
= wx
.GridSizer(rows
=3, cols
=3, hgap
=5, vgap
=5)
15 bw
= BlockWindow(self
, label
=label
)
16 flag
= flags
.get(label
, 0)
17 sizer
.Add(bw
, 0, flag
, 10)
21 app
= wx
.PySimpleApp()