]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-05/gridGeneric.py
6 data
= (("Bob", "Dernier"), ("Ryne", "Sandberg"),
7 ("Gary", "Matthews"), ("Leon", "Durham"),
8 ("Keith", "Moreland"), ("Ron", "Cey"),
9 ("Jody", "Davis"), ("Larry", "Bowa"),
10 ("Rick", "Sutcliffe"))
12 colLabels
= ("Last", "First")
13 rowLabels
= ("CF", "2B", "LF", "1B", "RF", "3B", "C", "SS", "P")
16 class SimpleGrid(wx
.grid
.Grid
):
17 def __init__(self
, parent
):
18 wx
.grid
.Grid
.__init
__(self
, parent
, -1)
19 tableBase
= generictable
.GenericTable(data
, rowLabels
,
21 self
.SetTable(tableBase
)
23 class TestFrame(wx
.Frame
):
24 def __init__(self
, parent
):
25 wx
.Frame
.__init
__(self
, parent
, -1, "A Grid",
27 grid
= SimpleGrid(self
)
29 if __name__
== '__main__':
30 app
= wx
.PySimpleApp()
31 frame
= TestFrame(None)