Index: Lib/lib-tk/Tkinter.py =================================================================== --- Lib/lib-tk/Tkinter.py (revision 73134) +++ Lib/lib-tk/Tkinter.py (working copy) @@ -2479,22 +2479,19 @@ 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 (not included).""" + """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 (not included).""" - if last: + """Get list of items from FIRST to LAST (included).""" + if last is not None: return self.tk.splitlist(self.tk.call( self._w, 'get', first, last)) else: @@ -2523,13 +2520,16 @@ """Scroll such that INDEX is visible.""" self.tk.call(self._w, 'see', index) def selection_anchor(self, index): - """Set the fixed end oft the selection to INDEX.""" + """Set the selection anchor to the element given by index. + If index refers to a non-existent element, then the closest + element is used. The selection anchor is the end of the + selection that is fixed while dragging out a selection with + the mouse.""" self.tk.call(self._w, 'selection', 'anchor', index) select_anchor = selection_anchor def selection_clear(self, first, last=None): - """Clear the selection from FIRST to LAST (not included).""" - self.tk.call(self._w, - 'selection', 'clear', first, last) + """Clear the selection from FIRST to LAST (included).""" + self.tk.call(self._w, 'selection', 'clear', first, last) select_clear = selection_clear def selection_includes(self, index): """Return 1 if INDEX is part of the selection.""" @@ -2537,7 +2537,7 @@ self._w, 'selection', 'includes', index)) select_includes = selection_includes 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.""" self.tk.call(self._w, 'selection', 'set', first, last) select_set = selection_set @@ -2569,11 +2569,11 @@ """Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).""" self.tk.call(self._w, 'yview', 'scroll', number, what) def itemcget(self, index, option): - """Return the resource value for an ITEM and an OPTION.""" + """Return the resource value for an item and an OPTION.""" return self.tk.call( (self._w, 'itemcget') + (index, '-'+option)) def itemconfigure(self, index, cnf=None, **kw): - """Configure resources of an ITEM. + """Configure resources of an item. The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments