(self, event)
return
Handle mouse moved with button held down, multiple selections
Handle mouse moved with button held down, multiple selections
Handle mouse moved with button held down multiple selections
def handle_mouse_drag(self, event):
        """Handle mouse moved with button held down, multiple selections"""

        if hasattr(self, 'cellentry'):
            self.cellentry.destroy()
        rowover = self.get_row_clicked(event)
        colover = self.get_col_clicked(event)
        if colover == None or rowover == None:
            return

        if rowover >= self.rows or self.startrow > self.rows:
            return
        else:
            self.endrow = rowover
        #do columns
        if colover > self.cols or self.startcol > self.cols:
            return
        else:
            self.endcol = colover
            if self.startcol is None or self.endcol is None:
                return
            if self.endcol < self.startcol:
                self.multiplecollist = range(self.endcol, self.startcol+1)
            else:
                self.multiplecollist = range(self.startcol, self.endcol+1)
            #print self.multiplecollist
        #draw the selected rows
        if self.endrow != self.startrow:
            if self.endrow < self.startrow:
                self.multiplerowlist = range(self.endrow, self.startrow+1)
            else:
                self.multiplerowlist = range(self.startrow, self.endrow+1)
            self.drawMultipleRows(self.multiplerowlist)
            self.tablerowheader.drawSelectedRows(self.multiplerowlist)
            #draw selected cells outline using row and col lists
            #print self.multiplerowlist
            self.drawMultipleCells()
        else:
            self.multiplerowlist = []
            self.multiplerowlist.append(self.currentrow)
            if len(self.multiplecollist) >= 1:
                self.drawMultipleCells()
            self.delete('multiplesel')
        #print self.multiplerowlist
        return
def handle_mouse_drag ( self , event ) : if hasattr ( self , 'cellentry' ) : self . cellentry . destroy ( ) rowover = self . get_row_clicked ( event ) colover = self . get_col_clicked ( event ) if colover == None or rowover == None : return if rowover >= self . rows or self . startrow > self . rows : return else : self . endrow = rowover #do columns if colover > self . cols or self . startcol > self . cols : return else : self . endcol = colover if self . startcol is None or self . endcol is None : return if self . endcol < self . startcol : self . multiplecollist = range ( self . endcol , self . startcol + 1 ) else : self . multiplecollist = range ( self . startcol , self . endcol + 1 ) #print self.multiplecollist #draw the selected rows if self . endrow != self . startrow : if self . endrow < self . startrow : self . multiplerowlist = range ( self . endrow , self . startrow + 1 ) else : self . multiplerowlist = range ( self . startrow , self . endrow + 1 ) self . drawMultipleRows ( self . multiplerowlist ) self . tablerowheader . drawSelectedRows ( self . multiplerowlist ) #draw selected cells outline using row and col lists #print self.multiplerowlist self . drawMultipleCells ( ) else : self . multiplerowlist = [ ] self . multiplerowlist . append ( self . currentrow ) if len ( self . multiplecollist ) >= 1 : self . drawMultipleCells ( ) self . delete ( 'multiplesel' ) #print self.multiplerowlist return