]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-11/basicgridsizer.py
don't use strlen() to verify the length of the string as it can contain embedded...
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-11 / basicgridsizer.py
1 import wx
2 from blockwindow import BlockWindow
3
4 labels = "one two three four five six seven eight nine".split()
5
6 class GridSizerFrame(wx.Frame):
7 def __init__(self):
8 wx.Frame.__init__(self, None, -1, "Basic Grid Sizer")
9 sizer = wx.GridSizer(rows=3, cols=3, hgap=5, vgap=5)
10 for label in labels:
11 bw = BlockWindow(self, label=label)
12 sizer.Add(bw, 0, 0)
13 self.SetSizer(sizer)
14 self.Fit()
15
16 app = wx.PySimpleApp()
17 GridSizerFrame().Show()
18 app.MainLoop()