Reputation: 1569
Im trying to edit the style of my program using ttk.Style, so I wrote this
import tkinter as tk
import tkinter.ttk as ttk
class Application:
def __init__(self):
self.root = tk.Tk()
self.root.minsize(width=400, height=400)
self.root.maxsize(width=400, height=400)
self.root.resizable(False, False)
self.theme = ttk.Style()
self.theme.theme_use('clam')
self.button = tk.Button(self.root, text='Test')
self.button.pack()
Yet when I run the code, nothing changes. I printed theme_use() and the theme is clam like I set, yet nothing happens. Is there anything I am doing wrong?
Upvotes: 0
Views: 762
Reputation: 385900
You aren’t using any ttk widgets. The style only affects ttk widgets.
Upvotes: 1