1 个回答
-
尝试使用主题的tk(ttk)检查按钮小部件:
import tkinter as tk from tkinter import ttk a = tk.Tk() var1 = tk.IntVar() check_btn = ttk.Checkbutton(a, text="checkbutton", variable=var1) check_btn.grid(row=1,sticky='w') # set foreground color to blue check_btn_style = ttk.Style() check_btn_style.configure('TCheckbutton', foreground='blue') a.mainloop()