(self, event)
return
Respond to a single press
Respond to a single press
Respond to a single press
def handle_left_click(self, event):
        """Respond to a single press"""

        #which row and column is the click inside?
        self.clearSelected()
        self.allrows = False
        rowclicked = self.get_row_clicked(event)
        colclicked = self.get_col_clicked(event)
        self.focus_set()
        if self.mode == 'formula':
            self.handleFormulaClick(rowclicked, colclicked)
            return
        if hasattr(self, 'cellentry'):
            self.cellentry.destroy()
        #ensure popup menus are removed if present
        if hasattr(self, 'rightmenu'):
            self.rightmenu.destroy()
        if hasattr(self.tablecolheader, 'rightmenu'):
            self.tablecolheader.rightmenu.destroy()

        self.startrow = rowclicked
        self.endrow = rowclicked
        self.startcol = colclicked
        self.endcol = colclicked
        #reset multiple selection list
        self.multiplerowlist=[]
        self.multiplerowlist.append(rowclicked)
        if rowclicked is None or colclicked is None:
            return
        if self.read_only is True:
            return
        if 0 <= rowclicked < self.rows and 0 <= colclicked < self.cols:
            self.setSelectedRow(rowclicked)
            self.setSelectedCol(colclicked)
            self.drawSelectedRect(self.currentrow, self.currentcol)
            self.drawSelectedRow()
            self.tablerowheader.drawSelectedRows(rowclicked)
            coltype = self.model.getColumnType(colclicked)
            if coltype == 'text' or coltype == 'number':
                self.drawCellEntry(rowclicked, colclicked)
        return
def handle_left_click ( self , event ) : #which row and column is the click inside? self . clearSelected ( ) self . allrows = False rowclicked = self . get_row_clicked ( event ) colclicked = self . get_col_clicked ( event ) self . focus_set ( ) if self . mode == 'formula' : self . handleFormulaClick ( rowclicked , colclicked ) return if hasattr ( self , 'cellentry' ) : self . cellentry . destroy ( ) #ensure popup menus are removed if present if hasattr ( self , 'rightmenu' ) : self . rightmenu . destroy ( ) if hasattr ( self . tablecolheader , 'rightmenu' ) : self . tablecolheader . rightmenu . destroy ( ) self . startrow = rowclicked self . endrow = rowclicked self . startcol = colclicked self . endcol = colclicked #reset multiple selection list self . multiplerowlist = [ ] self . multiplerowlist . append ( rowclicked ) if rowclicked is None or colclicked is None : return if self . read_only is True : return if 0 <= rowclicked < self . rows and 0 <= colclicked < self . cols : self . setSelectedRow ( rowclicked ) self . setSelectedCol ( colclicked ) self . drawSelectedRect ( self . currentrow , self . currentcol ) self . drawSelectedRow ( ) self . tablerowheader . drawSelectedRows ( rowclicked ) coltype = self . model . getColumnType ( colclicked ) if coltype == 'text' or coltype == 'number' : self . drawCellEntry ( rowclicked , colclicked ) return