]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-05/lineuptable.py
6 def __init__(self
, pos
, first
, last
):
11 class LineupTable(wx
.grid
.PyGridTableBase
):
13 colLabels
= ("First", "Last")
14 colAttrs
= ("first", "last")
16 def __init__(self
, entries
):
17 wx
.grid
.PyGridTableBase
.__init
__(self
)
18 self
.entries
= entries
20 def GetNumberRows(self
):
21 return len(self
.entries
)
23 def GetNumberCols(self
):
26 def GetColLabelValue(self
, col
):
27 return self
.colLabels
[col
]
29 def GetRowLabelValue(self
, col
):
30 return self
.entries
[row
].pos
32 def IsEmptyCell(self
, row
, col
):
35 def GetValue(self
, row
, col
):
36 entry
= self
.entries
[row
]
37 return getattr(entry
, self
.colAttrs
[col
])
39 def SetValue(self
, row
, col
, value
):