By "just post it here" I hope you meant here here. If not sorry, I will re-post elsewhere.
This is cut down to only one button but still the same problem. It may be a case of it "working by accident" part of the time.
I expect; black background with yellow letters to start - and yellow background with black letters when I hover over it with the mouse.
That is what happens on my Linux boxes.
On the Windows box, the foreground(text) does what I expect, but not the background. The button color- what I am calling the background- starts out grey, then turns light blue when I hover over it with the mouse. If I look really hard I can see a thin yellow outline around the button when I hover over it, so something yellow is happening- but not the same as in the Linux boxes.
- Code: Select all
from Tkinter import *
import Tkinter as tk
root = Tk()
content = Frame(root)
ttk.Style().configure("TButton", background="black", foreground="yellow", justify=LEFT)
style = ttk.Style()
EmpName11 = ttk.Button(content, text="huh", style="colorsiwant.TButton", width=9)
content.grid(column=0, row=0, sticky="nswe")
EmpName11.grid(column=1, row=1, sticky="nswe")
Thanks for any help,