]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-14/grid_size.py
fix building/running of tex2rtf
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-14 / grid_size.py
1 import wx
2 import wx.grid
3
4 class 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
20 app = wx.PySimpleApp()
21 frame = TestFrame()
22 frame.Show()
23 app.MainLoop()