📜  tkinter 进度条颜色 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:39.272000             🧑  作者: Mango

代码示例2
12345678910111213import tkinter as tk
from tkinter import ttk
 
root = tk.Tk()
frame = tk.Frame(root)
 
style = ttk.Style()
style.theme_use('alt')
style.configure("green.Horizontal.TProgressbar",
            foreground='green', background='green')
ttk.Progressbar(frame, style="green.Horizontal.TProgressbar", mode='determinate', maximum=4, value=2).pack()
frame.pack()
tk.mainloop()