]> git.saurik.com Git - wxWidgets.git/blame - wxPython/samples/wxPIA_book/Chapter-14/grid_basic.py
Added the sample code from wxPython In Action to the samples dir
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-14 / grid_basic.py
CommitLineData
be05b434
RD
1import wx
2import wx.grid
3
4class TestFrame(wx.Frame):
5 def __init__(self):
6 wx.Frame.__init__(self, None, title="Simple Grid",
7 size=(640,480))
8 grid = wx.grid.Grid(self)
9 grid.CreateGrid(50,50)
10 for row in range(20):
11 for col in range(6):
12 grid.SetCellValue(row, col,
13 "cell (%d,%d)" % (row, col))
14
15app = wx.PySimpleApp()
16frame = TestFrame()
17frame.Show()
18app.MainLoop()