2 # -*- coding: utf-8 -*-
3 #Author: Pierre Ratinaud
4 #Copyright (c) 2008-2009 Pierre Ratinaud
8 from wx.lib import sheet
11 class MySheet(sheet.CSheet):
12 def __init__(self, parent):
13 sheet.CSheet.__init__(self, parent)
15 self.row = self.col = 0
17 def OnGridSelectCell(self, event):
18 self.row, self.col = event.GetRow(), event.GetCol()
19 value = self.GetColLabelValue(self.col) + self.GetRowLabelValue(self.row)
22 def Populate(self,content):
24 self.SetNumberRows(nrow)
26 self.SetNumberCols(ncol)
27 for y in range(0,nrow):
28 for i in range(0,ncol):
29 self.SetCellValue(y,i,str(content[y][i]))