PEATDB/Tables.py
def draw_selected_rect(self, row, col, color=None):
        """User has clicked to select a cell"""
        if col >= self.cols:
            return
        self.delete('currentrect')
        bg=self.selectedcolor
        if color == None:
            color = 'gray25'
        w=3
        x1,y1,x2,y2 = self.getCellCoords(row,col)
        rect = self.create_rectangle(x1+w/2,y1+w/2,x2-w/2,y2-w/2,
                                  fill=bg,
                                  outline=color,
                                  width=w,
                                  stipple='gray50',
                                  tag='currentrect')
        #self.lower('currentrect')
        #raise text above all
        self.lift('celltext'+str(col)+'_'+str(row))
        return
User has clicked to select a cell
User has clicked to select a cell
User has clicked to select a cell
def draw_selected_rect(self, row, col, color=None):
        if col >= self.cols:
            return
        self.delete('currentrect')
        bg=self.selectedcolor
        if color == None:
            color = 'gray25'
        w=3
        x1,y1,x2,y2 = self.getCellCoords(row,col)
        rect = self.create_rectangle(x1+w/2,y1+w/2,x2-w/2,y2-w/2,
                                  fill=bg,
                                  outline=color,
                                  width=w,
                                  stipple='gray50',
                                  tag='currentrect')
        self.lift('celltext'+str(col)+'_'+str(row))
        return
def draw_selected_rect ( self , row , col , color = None ) : if col >= self . cols : return self . delete ( 'currentrect' ) bg = self . selectedcolor if color == None : color = 'gray25' w = 3 x1 , y1 , x2 , y2 = self . getCellCoords ( row , col ) rect = self . create_rectangle ( x1 + w / 2 , y1 + w / 2 , x2 - w / 2 , y2 - w / 2 , fill = bg , outline = color , width = w , stipple = 'gray50' , tag = 'currentrect' ) self . lift ( 'celltext' + str ( col ) + '_' + str ( row ) ) return
User has clicked to select a cell
User has clicked to select a cell
"""User has clicked to select a cell""" #self.lower('currentrect') #raise text above all
self
row
col
color