]> git.saurik.com Git - wxWidgets.git/blame - wxPython/samples/wxPIA_book/Chapter-14/grid_size.py
added missing button state
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-14 / grid_size.py
CommitLineData
be05b434
RD
1import wx
2import wx.grid
3
4class TestFrame(wx.Frame):
5
6
7 def __init__(self):
8 wx.Frame.__init__(self, None, title="Grid Sizes",
9 size=(600,300))
10 grid = wx.grid.Grid(self)
11 grid.CreateGrid(5,5)
12 for row in range(5):
13 for col in range(5):
14 grid.SetCellValue(row, col, "(%s,%s)" % (row, col))
15
16 grid.SetCellSize(2, 2, 2, 3)
17 grid.SetColSize(1, 125)
18 grid.SetRowSize(1, 100)
19
20app = wx.PySimpleApp()
21frame = TestFrame()
22frame.Show()
23app.MainLoop()