Title: colors in ttk treeview tags are ignored
Type: behavior Stage: resolved
Components: Tkinter Versions: Python 3.7
Status: closed Resolution: duplicate
Dependencies: Superseder: Treeview: wrong color change
View: 36468
Assigned To: Nosy List: dave9000, ned.deily
Priority: normal Keywords:

Created on 2019-07-10 12:05 by dave9000, last changed 2019-07-10 14:54 by ned.deily. This issue is now closed.

Messages (2)
msg347618 - (view) Author: dave (dave9000) Date: 2019-07-10 12:05
The following example code fails in Python 3.7.3 64 bit (both lines are displayed in black).
It works correctly in 3.7.2 and earlier.

import tkinter as tk
import tkinter.ttk as ttk

root = tk.Tk()

ttk.Label(root, text='This is a RED label', foreground='red').pack()

tree = ttk.Treeview(root)
tree.tag_configure('RED_TAG', foreground='red', font=('arial', 12))
tree.insert('', tk.END, text='Black line')
tree.insert('', tk.END, text='Red line', tag='RED_TAG')

msg347622 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-07-10 14:54
Thanks for the report. The problem you are seeing here appears to be a duplicate of that described in Issue36468 which describes this behavior change as a regression in Tk and also suggests a workaround.
Date User Action Args
2019-07-10 14:54:21ned.deilysetstatus: open -> closed

superseder: Treeview: wrong color change

nosy: + ned.deily
messages: + msg347622
resolution: duplicate
stage: resolved
2019-07-10 12:05:11dave9000create