diff options
Diffstat (limited to 'Lib/tkinter/__init__.py')
-rw-r--r-- | Lib/tkinter/__init__.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index fea4bd9..10ac188 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -2586,22 +2586,19 @@ class Listbox(Widget, XView, YView): def activate(self, index): """Activate item identified by INDEX.""" self.tk.call(self._w, 'activate', index) - def bbox(self, *args): + def bbox(self, index): """Return a tuple of X1,Y1,X2,Y2 coordinates for a rectangle - which encloses the item identified by index in ARGS.""" - return self._getints( - self.tk.call((self._w, 'bbox') + args)) or None + which encloses the item identified by the given index.""" + return self._getints(self.tk.call(self._w, 'bbox', index)) or None def curselection(self): - """Return list of indices of currently selected item.""" - # XXX Ought to apply self._getints()... - return self.tk.splitlist(self.tk.call( - self._w, 'curselection')) + """Return the indices of currently selected item.""" + return self._getints(self.tk.call(self._w, 'curselection')) or () def delete(self, first, last=None): """Delete items from FIRST to LAST (included).""" self.tk.call(self._w, 'delete', first, last) def get(self, first, last=None): """Get list of items from FIRST to LAST (included).""" - if last: + if last is not None: return self.tk.splitlist(self.tk.call( self._w, 'get', first, last)) else: |