Next / Previous / Contents / Shipman's homepage

5.12. ScrolledList.delete(): Remove a line of text

This method removes a specified line from the listbox. If the given position is out of range, we do nothing.

scrolledlist.py
    def delete(self, linex):
        """Delete a line from the listbox.
        """
        if  0 <= linex < self.count():
            self.listbox.delete(linex)