Matthew Barnett <pyt...@mrabarnett.plus.com> added the comment:
I've just come across the same problem. For future reference, adding the following code before using a Treeview widget will fix the problem: def fixed_map(option): # Fix for setting text colour for Tkinter 8.6.9 # From: https://core.tcl.tk/tk/info/509cafafae # # Returns the style map for 'option' with any styles starting with # ('!disabled', '!selected', ...) filtered out. # style.map() returns an empty list for missing options, so this # should be future-safe. return [elm for elm in style.map('Treeview', query_opt=option) if elm[:2] != ('!disabled', '!selected')] style = ttk.Style() style.map('Treeview', foreground=fixed_map('foreground'), background=fixed_map('background')) ---------- nosy: +mrabarnett _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36468> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com