]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/samples/wxPIA_book/Chapter-14/grid_headers.py
added missing button state
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-14 / grid_headers.py
... / ...
CommitLineData
1import wx
2import wx.grid
3
4class TestFrame(wx.Frame):
5
6 rowLabels = ["uno", "dos", "tres", "quatro", "cinco"]
7 colLabels = ["homer", "marge", "bart", "lisa", "maggie"]
8
9 def __init__(self):
10 wx.Frame.__init__(self, None, title="Grid Headers",
11 size=(500,200))
12 grid = wx.grid.Grid(self)
13 grid.CreateGrid(5,5)
14 for row in range(5):
15 grid.SetRowLabelValue(row, self.rowLabels[row])
16 grid.SetColLabelValue(row, self.colLabels[row])
17 for col in range(5):
18 grid.SetCellValue(row, col,
19 "(%s,%s)" % (self.rowLabels[row], self.colLabels[col]))
20
21app = wx.PySimpleApp()
22frame = TestFrame()
23frame.Show()
24app.MainLoop()