(self)
return
Delete a row
Delete a row
Delete a row
def deleteRow(self):
        """Delete a row"""

        if len(self.multiplerowlist)>1:
            n = messagebox.askyesno("Delete",
                                      "Delete Selected Records?",
                                      parent=self.parentframe)
            if n == True:
                rows = self.multiplerowlist
                self.model.deleteRows(rows)
                self.clearSelected()
                self.setSelectedRow(0)
                self.redrawTable()
        else:
            n = messagebox.askyesno("Delete",
                                      "Delete This Record?",
                                      parent=self.parentframe)
            if n:
                row = self.getSelectedRow()
                self.model.deleteRow(row)
                self.setSelectedRow(row-1)
                self.clearSelected()
                self.redrawTable()
        return
def deleteRow ( self ) : if len ( self . multiplerowlist ) > 1 : n = messagebox . askyesno ( "Delete" , "Delete Selected Records?" , parent = self . parentframe ) if n == True : rows = self . multiplerowlist self . model . deleteRows ( rows ) self . clearSelected ( ) self . setSelectedRow ( 0 ) self . redrawTable ( ) else : n = messagebox . askyesno ( "Delete" , "Delete This Record?" , parent = self . parentframe ) if n : row = self . getSelectedRow ( ) self . model . deleteRow ( row ) self . setSelectedRow ( row - 1 ) self . clearSelected ( ) self . redrawTable ( ) return