]> git.saurik.com Git - wxWidgets.git/blame - wxPython/samples/wxPIA_book/Chapter-11/bordergridsizer.py
fix building/running of tex2rtf
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-11 / bordergridsizer.py
CommitLineData
be05b434
RD
1import wx
2from blockwindow import BlockWindow
3
4labels = "one two three four five six seven eight nine".split()
5flags = {"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}
9
10class TestFrame(wx.Frame):
11 def __init__(self):
12 wx.Frame.__init__(self, None, -1, "GridSizer Borders")
13 sizer = wx.GridSizer(rows=3, cols=3, hgap=5, vgap=5)
14 for label in labels:
15 bw = BlockWindow(self, label=label)
16 flag = flags.get(label, 0)
17 sizer.Add(bw, 0, flag, 10)
18 self.SetSizer(sizer)
19 self.Fit()
20
21app = wx.PySimpleApp()
22TestFrame().Show()
23app.MainLoop()