]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-11/mingridsizer.py
fixed wxVsnprintf() to write as much as it can if the output buffer is too short
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-11 / mingridsizer.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 TestFrame(wx.Frame):
7 def __init__(self):
8 wx.Frame.__init__(self, None, -1, "GridSizer Test")
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 center = self.FindWindowByName("five")
14 center.SetMinSize((150,50))
15 self.SetSizer(sizer)
16 self.Fit()
17 app = wx.PySimpleApp()
18 TestFrame().Show()
19 app.MainLoop()