diff options
Diffstat (limited to 'Lib/tkinter/ttk.py')
-rw-r--r-- | Lib/tkinter/ttk.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py index 8f9369b..0e5759d 100644 --- a/Lib/tkinter/ttk.py +++ b/Lib/tkinter/ttk.py @@ -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): |