mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #26386: Fixed ttk.TreeView selection operations with item id's
containing spaces.
This commit is contained in:
parent
6afbc653a7
commit
8e6d09c1cc
3 changed files with 57 additions and 1 deletions
|
@ -1392,7 +1392,9 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
|
|||
|
||||
def selection(self, selop=None, items=None):
|
||||
"""If selop is not specified, returns selected items."""
|
||||
return self.tk.call(self._w, "selection", selop, items)
|
||||
if isinstance(items, (str, bytes)):
|
||||
items = (items,)
|
||||
return self.tk.splitlist(self.tk.call(self._w, "selection", selop, items))
|
||||
|
||||
|
||||
def selection_set(self, items):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue