]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-05/generictable.py
4 class GenericTable(wx
.grid
.PyGridTableBase
):
6 def __init__(self
, data
, rowLabels
=None, colLabels
=None):
7 wx
.grid
.PyGridTableBase
.__init
__(self
)
9 self
.rowLabels
= rowLabels
10 self
.colLabels
= colLabels
12 def GetNumberRows(self
):
15 def GetNumberCols(self
):
16 return len(self
.data
[0])
18 def GetColLabelValue(self
, col
):
20 return self
.colLabels
[col
]
22 def GetRowLabelValue(self
, row
):
24 return self
.rowLabels
[row
]
26 def IsEmptyCell(self
, row
, col
):
29 def GetValue(self
, row
, col
):
30 return self
.data
[row
][col
]
32 def SetValue(self
, row
, col
, value
):