[New-bugs-announce] [issue28313] ttk Style().configure() overwrites Tk().option_add() Button but not Label
qubodup
report at bugs.python.org
Thu Sep 29 11:28:28 EDT 2016
New submission from qubodup:
The following code will result in a small label and a big button:
from tkinter import *
from tkinter.ttk import *
root = Tk()
root.option_add("*Font", "sans-serif 12")
s = Style()
s.configure('TButton', font=('courier', 40))
s.configure('TLabel', font=('courier', 40))
Label(root, text="lbl").pack()
Button(root, text="bttn").pack()
root.mainloop()
It seems to me that both should have the same style. Removing the root.option_add line fixes it of course but this is a stripped-down example and in other cases it might be needed.
----------
components: Tkinter
files: 1475162805-.png
messages: 277706
nosy: qubodup
priority: normal
severity: normal
status: open
title: ttk Style().configure() overwrites Tk().option_add() Button but not Label
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file44880/1475162805-.png
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28313>
_______________________________________
More information about the New-bugs-announce
mailing list