PEATDB/Tables.py
def handle_left_release(self,event):
        """When mouse released implement resize or col move"""
        self.delete('dragrect')
        if self.atdivider == 1:
            #col = self.table.get_col_clicked(event)
            x=int(self.canvasx(event.x))
            col = self.table.currentcol
            x1,y1,x2,y2 = self.table.getCellCoords(0,col)
            newwidth=x - x1
            if newwidth < 5:
                newwidth=5
            self.table.resize_Column(col, newwidth)
            self.table.delete('resizeline')
            self.delete('resizeline')
            self.delete('resizesymbol')
            self.atdivider = 0
            return
        self.delete('resizesymbol')
        #move column
        if self.draggedcol != None and self.table.currentcol != self.draggedcol:
            self.model.moveColumn(self.table.currentcol, self.draggedcol)
            self.table.setSelectedCol(self.draggedcol)
            self.table.redrawTable()
            self.table.drawSelectedCol(self.table.currentcol)
            self.draw_rect(self.table.currentcol)

        return
When mouse released implement resize or col move
When mouse released implement resize or col move
When mouse released implement resize or col move
def handle_left_release(self,event):
        self.delete('dragrect')
        if self.atdivider == 1:
            x=int(self.canvasx(event.x))
            col = self.table.currentcol
            x1,y1,x2,y2 = self.table.getCellCoords(0,col)
            newwidth=x - x1
            if newwidth < 5:
                newwidth=5
            self.table.resize_Column(col, newwidth)
            self.table.delete('resizeline')
            self.delete('resizeline')
            self.delete('resizesymbol')
            self.atdivider = 0
            return
        self.delete('resizesymbol')
        if self.draggedcol != None and self.table.currentcol != self.draggedcol:
            self.model.moveColumn(self.table.currentcol, self.draggedcol)
            self.table.setSelectedCol(self.draggedcol)
            self.table.redrawTable()
            self.table.drawSelectedCol(self.table.currentcol)
            self.draw_rect(self.table.currentcol)
        return
def handle_left_release ( self , event ) : self . delete ( 'dragrect' ) if self . atdivider == 1 : x = int ( self . canvasx ( event . x ) ) col = self . table . currentcol x1 , y1 , x2 , y2 = self . table . getCellCoords ( 0 , col ) newwidth = x - x1 if newwidth < 5 : newwidth = 5 self . table . resize_Column ( col , newwidth ) self . table . delete ( 'resizeline' ) self . delete ( 'resizeline' ) self . delete ( 'resizesymbol' ) self . atdivider = 0 return self . delete ( 'resizesymbol' ) if self . draggedcol != None and self . table . currentcol != self . draggedcol : self . model . moveColumn ( self . table . currentcol , self . draggedcol ) self . table . setSelectedCol ( self . draggedcol ) self . table . redrawTable ( ) self . table . drawSelectedCol ( self . table . currentcol ) self . draw_rect ( self . table . currentcol ) return
When mouse released implement resize or col move
When mouse released implement resize or col move
"""When mouse released implement resize or col move""" #col = self.table.get_col_clicked(event) #move column
self
event