代码拉取完成,页面将自动刷新
同步操作将从 cheney/tkinter界面展示 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import tkinter as tk
import time
import logging, logg
import tkinter.ttk as ttk
# Useful third party website
# https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/frame.html
# https://tkdocs.com/tutorial/widgets.html
# https://www.tutorialspoint.com/python3/python_gui_programming.htm
# current file logger
cf_logger = logging.getLogger('Tk_widgets_sample.ttk_widgets')
def ttk_styles():
# https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/ttk-style-layer.html
# get master
master = tk.Tk()
style = ttk.Style()
# gloabal default style
style.configure('.', font='Arial 19', foreground='yellow', background='red')
# custom style
style.configure('mystyle.TButton', font='Arial 15', foreground='blue', padding=10)
# buttons
btn1 = ttk.Button(master, text='Im using default gloable style')
btn1.pack()
btn2 = ttk.Button(master, text='Im using mystyle', style='mystyle.TButton')
btn2.pack()
master.mainloop()
if __name__ == '__main__':
ttk_styles()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。