[New-bugs-announce] [issue36468] Treeview: wrong color change

Burgunder report at bugs.python.org
Fri Mar 29 04:31:58 EDT 2019


New submission from Burgunder <guillaume.burgunder at univ-fcomte.fr>:

Hello,
color change with Treeview does not work in Python 3.7.3,
but it works with Python 3.7.2.

Test code:
# -*- coding: utf-8 -*-
import tkinter
from tkinter import ttk
root = tkinter.Tk ()
style = ttk.Style (root)
style.configure ("Treeview", foreground="yellow", background="grey", fieldbackground="green")
tree = ttk.Treeview (root, columns=('Data'))
tree.heading ('#0', text='Item')
tree.heading ('#1', text='Data')
tree.insert ("", "end", text="Item_0", values=100, tags="A")
tree.insert ("", "end", text="Item_1", values=200, tags="B")
tree.insert ("", "end", text="Item_2", values=300, tags="C")
tree.tag_configure ("A", foreground="black") #Py 3.7.3: no effect
tree.tag_configure ("B", foreground="red")
tree.pack ()
root.mainloop ()

----------
components: Tkinter
files: test_treeview_color.png
messages: 339101
nosy: guillaumeb
priority: normal
severity: normal
status: open
title: Treeview: wrong color change
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48238/test_treeview_color.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36468>
_______________________________________


More information about the New-bugs-announce mailing list