]> vault307.fbx.one Git - mu_code.git/blob - themeDemo.py
early learning in mu editor
[mu_code.git] / themeDemo.py
1 import tkinter as tk
2 from tkinter import ttk
3
4 root=tk.Tk()
5
6 s=ttk.Style()
7 s.configure('Wild.TButton',
8 background='black',
9 foreground='white',
10 highlightthickness='20',
11 font=('Helvetica', 18, 'bold'))
12 s.map('Wild.TButton',
13 foreground=[('disabled','yellow'),
14 ('pressed','red'),
15 ('active','blue')],
16 background=[('disabled','magenta'),
17 ('pressed','!focus','cyan'),
18 ('active','green')],
19 highlightcolor=[('focus','green'),
20 ('!focus','red')],
21 relief=[('pressed','groove'),
22 ('!pressed','ridge')])
23
24 button=ttk.Button(text='test', style="Wild.TButton")
25 button.pack(expand=True)
26
27 root.mainloop()