|
2018-04-29
| ||
| 12:24 | • Closed ticket [9a3b1ab453]: ttk Label -background option not respected on macOS ... artifact: 8f23e4626a user: bll | |
| 12:10 | • New ticket [9a3b1ab453]. artifact: cbea172561 user: cmaceachern | |
ttk Label -background option not respected on macOS X 10.13.4
Closed / Invalid9a3b1ab453693710f6fd6b0728ae8b153d775be5Created 9 years agoUpdated 9 years ago
Descriptionplain2018-04-29 12:10:13
Hi, I was directed to report my bug here from the python bug tracker site. When using python 3.7.0b3 (newest possible version to get latest included tk, which is 8.6 as reported by "$ python3 -c 'import tkinter; print(tkinter.TkVersion);'". Setting the background color for a ttk Label does not change the background color. Here is the code I ran on python if it helps at all, and I have a screenshot but I can't add it here: import tkinter as tk from tkinter import ttk r = tk.Tk() l = ttk.Label(r, text='colored label', background='red') l.pack() r.mainloop() This same code works if I use the classic tk Label, as opposed to the ttk Label, and python bug tracker told me the issue is not with them as their 'tkinter' module is a simple wrapper around tk/tcl calls and to report here. Any ideas?
bllplain2018-04-29 12:24:33
Mac OS X and the aqua theme has a very limited set of colors that are allowed. This is a Mac OS X limitation and not a Tk bug. Use the 'label' widget when you need a colored background.
Log in (anonymous is fine) to add a comment.