mirror of
https://github.com/python/cpython.git
synced 2024-11-28 20:33:54 +08:00
SF patch #581396, Canvas "select_item" always returns None
Return the selected item, if there is any.
This commit is contained in:
parent
ef5d06bd3f
commit
58b63bf4e3
@ -2103,7 +2103,7 @@ class Canvas(Widget):
|
||||
self.tk.call(self._w, 'select', 'from', tagOrId, index)
|
||||
def select_item(self):
|
||||
"""Return the item which has the selection."""
|
||||
self.tk.call(self._w, 'select', 'item')
|
||||
return self.tk.call(self._w, 'select', 'item') or None
|
||||
def select_to(self, tagOrId, index):
|
||||
"""Set the variable end of a selection in item TAGORID to INDEX."""
|
||||
self.tk.call(self._w, 'select', 'to', tagOrId, index)
|
||||
|
Loading…
Reference in New Issue
Block a user