菜鸟IT的博客 >> Python
tkinter窗口美化 ttkbootstrap
# 主题还有
# light
# cosmo - flatly - journal - literal - lumen - minty - pulse - sandstone - united - yeti
#
# dark
# cyborg - darkly - solar - superhero
from ttkbootstrap import Style
from tkinter import ttk
style = Style(theme = "flatly") # 使用的主题名称
window1 = style.master
window1.geometry("300x200")
bt1=ttk.Button(window1, text="Submit1")
bt1.pack(side='left', padx=5, pady=10)
bt2=ttk.Button(window1, text="Submit2")
bt2.pack(side='left', padx=5, pady=10)
window1.mainloop()
菜鸟IT博客[2022.03.05-19:24] 访问:325