]> git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-14/grid_basic.py
don't use strlen() to verify the length of the string as it can contain embedded...
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-14 / grid_basic.py
1 import wx
2 import wx.grid
3
4 class 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
15 app = wx.PySimpleApp()
16 frame = TestFrame()
17 frame.Show()
18 app.MainLoop()