(self, rows, cols=None, newColor=None, key=None, redraw=True)
return
Set the cell color for one or more cells and save it in the model color
Set the cell color for one or more cells and save it in the model color
Set the cell color for one or more cells and save it in the model color
def setcellColor(self, rows, cols=None, newColor=None, key=None, redraw=True):
        """Set the cell color for one or more cells and save it in the model color"""

        model = self.getModel()
        if newColor == None:
            ctuple, newColor = tkColorChooser.askcolor(title='pick a color')
            if newColor == None:
                return

        if type(rows) is int:
            x=rows
            rows=[]
            rows.append(x)
        if self.allrows == True:
            #we use all rows if the whole column has been selected
            rows = range(0,self.rows)
        if cols == None:
            cols = range(self.cols)
        for col in cols:
            for row in rows:
                #absrow = self.get_AbsoluteRow(row)
                model.setColorAt(row, col, color=newColor, key=key)
                #setcolor(absrow, col)
        if redraw == True:
            self.redrawTable()
        return
def setcellColor ( self , rows , cols = None , newColor = None , key = None , redraw = True ) : model = self . getModel ( ) if newColor == None : ctuple , newColor = tkColorChooser . askcolor ( title = 'pick a color' ) if newColor == None : return if type ( rows ) is int : x = rows rows = [ ] rows . append ( x ) if self . allrows == True : #we use all rows if the whole column has been selected rows = range ( 0 , self . rows ) if cols == None : cols = range ( self . cols ) for col in cols : for row in rows : #absrow = self.get_AbsoluteRow(row) model . setColorAt ( row , col , color = newColor , key = key ) #setcolor(absrow, col) if redraw == True : self . redrawTable ( ) return