1 # -*- coding: utf-8 -*-
2 #Author: Pierre Ratinaud
3 #Copyright (c) 2008-2020 Pierre Ratinaud
4 #modification pour python 3 : Laurent Mérat, 6x7 - mai 2020
7 #------------------------------------
8 # import des modules wx
9 #------------------------------------
10 from wx.lib import sheet
12 # utilisé seulement dans layout.py
15 class MySheet(sheet.CSheet):
17 def __init__(self, parent):
18 sheet.CSheet.__init__(self, parent)
20 self.row = self.col = 0
22 def OnGridSelectCell(self, event):
23 self.row, self.col = event.GetRow(), event.GetCol()
24 value = self.GetColLabelValue(self.col) + self.GetRowLabelValue(self.row)
27 def Populate(self,content):
29 self.SetNumberRows(nrow)
31 self.SetNumberCols(ncol)
32 for y in range(0,nrow):
33 for i in range(0,ncol):
34 self.SetCellValue(y,i,str(content[y][i]))