Issue #6181: Fixed errors in tkinter.Listbox docstrings.
Based on patch by Guilherme Polo.
This commit is contained in:
parent
9e51f509e6
commit
417367a48a
|
@ -2580,10 +2580,10 @@ class Listbox(Widget, XView, YView):
|
||||||
return self.tk.splitlist(self.tk.call(
|
return self.tk.splitlist(self.tk.call(
|
||||||
self._w, 'curselection'))
|
self._w, 'curselection'))
|
||||||
def delete(self, first, last=None):
|
def delete(self, first, last=None):
|
||||||
"""Delete items from FIRST to LAST (not included)."""
|
"""Delete items from FIRST to LAST (included)."""
|
||||||
self.tk.call(self._w, 'delete', first, last)
|
self.tk.call(self._w, 'delete', first, last)
|
||||||
def get(self, first, last=None):
|
def get(self, first, last=None):
|
||||||
"""Get list of items from FIRST to LAST (not included)."""
|
"""Get list of items from FIRST to LAST (included)."""
|
||||||
if last:
|
if last:
|
||||||
return self.tk.splitlist(self.tk.call(
|
return self.tk.splitlist(self.tk.call(
|
||||||
self._w, 'get', first, last))
|
self._w, 'get', first, last))
|
||||||
|
@ -2617,7 +2617,7 @@ class Listbox(Widget, XView, YView):
|
||||||
self.tk.call(self._w, 'selection', 'anchor', index)
|
self.tk.call(self._w, 'selection', 'anchor', index)
|
||||||
select_anchor = selection_anchor
|
select_anchor = selection_anchor
|
||||||
def selection_clear(self, first, last=None):
|
def selection_clear(self, first, last=None):
|
||||||
"""Clear the selection from FIRST to LAST (not included)."""
|
"""Clear the selection from FIRST to LAST (included)."""
|
||||||
self.tk.call(self._w,
|
self.tk.call(self._w,
|
||||||
'selection', 'clear', first, last)
|
'selection', 'clear', first, last)
|
||||||
select_clear = selection_clear
|
select_clear = selection_clear
|
||||||
|
@ -2627,7 +2627,7 @@ class Listbox(Widget, XView, YView):
|
||||||
self._w, 'selection', 'includes', index))
|
self._w, 'selection', 'includes', index))
|
||||||
select_includes = selection_includes
|
select_includes = selection_includes
|
||||||
def selection_set(self, first, last=None):
|
def selection_set(self, first, last=None):
|
||||||
"""Set the selection from FIRST to LAST (not included) without
|
"""Set the selection from FIRST to LAST (included) without
|
||||||
changing the currently selected elements."""
|
changing the currently selected elements."""
|
||||||
self.tk.call(self._w, 'selection', 'set', first, last)
|
self.tk.call(self._w, 'selection', 'set', first, last)
|
||||||
select_set = selection_set
|
select_set = selection_set
|
||||||
|
|
Loading…
Reference in New Issue