[New-bugs-announce] [issue44243] tkinter button colors on Mac
Terry J. Reedy
report at bugs.python.org
Wed May 26 21:56:01 EDT 2021
New submission from Terry J. Reedy <tjreedy at udel.edu>:
Mac Mohave, 3.9 with 8.6.8 and 3.10 with 8.6.11
import tkinter as tk
r = tk.Tk()
b = tk.Button(r, text='START', fg='white', bg='red') # Or '#f00'.
b.pack()
r.mainloop()
On Windows, white on red button, as expected. On Mac, all white until one presses and holds mouse, and then blue background. Default black on white works OK.
This may be new since several years ago, when 2 of us worked on turtle demo, which has 3 such buttons. They all now misbehave (reported by Raymond). If someone tested on Mac, it must have worked then.
I retried with the b= line replaced with
s = ttk.Style()
s.configure('Td.TButton', foreground='white', background='red')
b = ttk.Button(r, text='START', style='Td.TButton')
with the same result. (Mark, did I get this right?)
----------
components: Tkinter, macOS
messages: 394506
nosy: markroseman, ned.deily, rhettinger, ronaldoussoren, taleinat, terry.reedy
priority: normal
severity: normal
status: open
title: tkinter button colors on Mac
versions: Python 3.10, Python 3.11, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44243>
_______________________________________
More information about the New-bugs-announce
mailing list