PEATDB/Tables.py
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 self.check_PageView(rowover) == 1:
            return
        if rowover >= self.rows or self.startrow > self.rows:
            #print rowover
            return
        else:
            self.endrow = rowover
        #do columns
        if colover > self.cols or self.startcol > self.cols:
            return
        else:
            self.endcol = colover
            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
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):
        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 self.check_PageView(rowover) == 1:
            return
        if rowover >= self.rows or self.startrow > self.rows:
            return
        else:
            self.endrow = rowover
        if colover > self.cols or self.startcol > self.cols:
            return
        else:
            self.endcol = colover
            if self.endcol < self.startcol:
                self.multiplecollist=range(self.endcol, self.startcol+1)
            else:
                self.multiplecollist=range(self.startcol, self.endcol+1)
        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)
            self.drawMultipleCells()
        else:
            self.multiplerowlist = []
            self.multiplerowlist.append(self.currentrow)
            if len(self.multiplecollist) >= 1:
                self.drawMultipleCells()
            self.delete('multiplesel')
        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 self . check_PageView ( rowover ) == 1 : return if rowover >= self . rows or self . startrow > self . rows : return else : self . endrow = rowover if colover > self . cols or self . startcol > self . cols : return else : self . endcol = colover if self . endcol < self . startcol : self . multiplecollist = range ( self . endcol , self . startcol + 1 ) else : self . multiplecollist = range ( self . startcol , self . endcol + 1 ) 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 ) self . drawMultipleCells ( ) else : self . multiplerowlist = [ ] self . multiplerowlist . append ( self . currentrow ) if len ( self . multiplecollist ) >= 1 : self . drawMultipleCells ( ) self . delete ( 'multiplesel' ) 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""" #print rowover #do columns #print self.multiplecollist #draw the selected rows #draw selected cells outline using row and col lists #print self.multiplerowlist #print self.multiplerowlist
self
event