]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-05/gridNoModel.py
4 class SimpleGrid(wx
.grid
.Grid
):
5 def __init__(self
, parent
):
6 wx
.grid
.Grid
.__init
__(self
, parent
, -1)
8 self
.SetColLabelValue(0, "First")
9 self
.SetColLabelValue(1, "Last")
10 self
.SetRowLabelValue(0, "CF")
11 self
.SetCellValue(0, 0, "Bob")
12 self
.SetCellValue(0, 1, "Dernier")
13 self
.SetRowLabelValue(1, "2B")
14 self
.SetCellValue(1, 0, "Ryne")
15 self
.SetCellValue(1, 1, "Sandberg")
16 self
.SetRowLabelValue(2, "LF")
17 self
.SetCellValue(2, 0, "Gary")
18 self
.SetCellValue(2, 1, "Matthews")
19 self
.SetRowLabelValue(3, "1B")
20 self
.SetCellValue(3, 0, "Leon")
21 self
.SetCellValue(3, 1, "Durham")
22 self
.SetRowLabelValue(4, "RF")
23 self
.SetCellValue(4, 0, "Keith")
24 self
.SetCellValue(4, 1, "Moreland")
25 self
.SetRowLabelValue(5, "3B")
26 self
.SetCellValue(5, 0, "Ron")
27 self
.SetCellValue(5, 1, "Cey")
28 self
.SetRowLabelValue(6, "C")
29 self
.SetCellValue(6, 0, "Jody")
30 self
.SetCellValue(6, 1, "Davis")
31 self
.SetRowLabelValue(7, "SS")
32 self
.SetCellValue(7, 0, "Larry")
33 self
.SetCellValue(7, 1, "Bowa")
34 self
.SetRowLabelValue(8, "P")
35 self
.SetCellValue(8, 0, "Rick")
36 self
.SetCellValue(8, 1, "Sutcliffe")
38 class TestFrame(wx
.Frame
):
39 def __init__(self
, parent
):
40 wx
.Frame
.__init
__(self
, parent
, -1, "A Grid",
42 grid
= SimpleGrid(self
)
44 if __name__
== '__main__':
45 app
= wx
.PySimpleApp()
46 frame
= TestFrame(None)