This problem nearly makes me craze. I am a new beginner and without knowledge of tck/tk. I have done carefully search on the internet but haven\'t found a good solution.
The issue is that if you really want to control a style in detail you need to use the layout. So first identify the widget class using:
>>b=ttk.Button(None)
>>b.winfo_class()
'TButton
Then use the command
>>> s.layout('TButton')
[("Button.border", {"children": [("Button.focus", {"children":
[("Button.spacing",
{"children": [("Button.label", {"sticky": "nswe"})], "sticky": "nswe"})],
"sticky": "nswe"})], "sticky": "nswe", "border": "1"})]
Finally change what you want:
s.layout("MYButton.TButton",[("Button.border", {"children":
[("Button.focus", {"children": [("Button.spacing", {"children":
[("Button.label", {"sticky": "nswe"})], "sticky": "nswe"})], "sticky":
"nswe"})], "sticky": "we", "border": "1"})]
This made the trick for me and finally provides me a way to control my ttk widget!!!
Luca