Lines Matching refs:cell
38 m.cell = self.cellvalue
43 cell = self.getcell(x, y)
44 if hasattr(cell, 'recalc'):
45 return cell.recalc(self.rexec)
47 return cell
63 def setcell(self, x, y, cell): argument
65 assert isinstance(cell, BaseCell)
66 self.cells[x, y] = cell
102 cell = self.cells[x, y]
103 if hasattr(cell, 'renumber'):
104 cell = cell.renumber(x1, y1, x2, y2, dx, dy)
108 new[x, y] = cell
139 for cell in self.cells.itervalues():
140 if hasattr(cell, 'reset'):
141 cell.reset()
145 for cell in self.cells.itervalues():
146 if hasattr(cell, 'recalc'):
147 cell.recalc(self.rexec)
163 for (x, y), cell in self.cells.iteritems():
166 if hasattr(cell, 'recalc'):
167 cell.recalc(self.rexec)
168 if hasattr(cell, 'format'):
169 text, alignment = cell.format()
173 text = str(cell)
174 if isinstance(cell, str):
201 for (x, y), cell in self.cells.iteritems():
202 if hasattr(cell, 'xml'):
203 cellxml = cell.xml()
205 cellxml = '<value>%s</value>' % cgi.escape(cell)
295 self.cell = self.value
297 self.cell = StringCell(self.value,
301 self.cell = NumericCell(self.value,
306 self.cell = FormulaCell(text,
311 self.sheet.setcell(self.x, self.y, self.cell)
565 cell = self.sheet.getcell(x, y)
566 if cell is None:
568 elif isinstance(cell, FormulaCell):
569 text = '=' + cell.formula
571 text, alignment = cell.format()
585 cell = Tk.Label(self.cellgrid, relief='raised')
586 cell.grid_configure(column=0, row=0, sticky='NSWE')
587 cell.bind("<ButtonPress-1>", self.selectall)
591 cell = Tk.Label(self.cellgrid, text=colnum2name(x), relief='raised')
592 cell.grid_configure(column=x, row=0, sticky='WE')
593 self.gridcells[x, 0] = cell
594 cell.__x = x
595 cell.__y = 0
596 cell.bind("<ButtonPress-1>", self.selectcolumn)
597 cell.bind("<B1-Motion>", self.extendcolumn)
598 cell.bind("<ButtonRelease-1>", self.extendcolumn)
599 cell.bind("<Shift-Button-1>", self.extendcolumn)
602 cell = Tk.Label(self.cellgrid, text=str(y), relief='raised')
603 cell.grid_configure(column=0, row=y, sticky='WE')
604 self.gridcells[0, y] = cell
605 cell.__x = 0
606 cell.__y = y
607 cell.bind("<ButtonPress-1>", self.selectrow)
608 cell.bind("<B1-Motion>", self.extendrow)
609 cell.bind("<ButtonRelease-1>", self.extendrow)
610 cell.bind("<Shift-Button-1>", self.extendrow)
614 cell = Tk.Label(self.cellgrid, relief='sunken',
616 cell.grid_configure(column=x, row=y, sticky='NSWE')
617 self.gridcells[x, y] = cell
618 cell.__x = x
619 cell.__y = y
621 cell.bind("<ButtonPress-1>", self.press)
622 cell.bind("<B1-Motion>", self.motion)
623 cell.bind("<ButtonRelease-1>", self.release)
624 cell.bind("<Shift-Button-1>", self.release)
702 for (x, y), cell in self.gridcells.iteritems():
704 cell['bg'] = 'lightBlue'
738 for (x, y), cell in self.gridcells.iteritems():
740 cell['bg'] = 'white'
774 cell = None
776 cell = FormulaCell(text[1:])
784 cell = NumericCell(value)
786 if cell is None and text:
787 cell = StringCell(text)
788 if cell is None:
791 self.sheet.setcell(x, y, cell)
800 cell = self.sheet.getcell(x, y)
801 if cell is None:
804 if hasattr(cell, 'format'):
805 text, alignment = cell.format()
807 text, alignment = str(cell), LEFT
819 cell = NumericCell(y)
821 cell = NumericCell(x)
826 cell = FormulaCell(formula)
827 a.setcell(x, y, cell)