【发布时间】:2017-02-16 17:43:07
【问题描述】:
我正在尝试按照以下文档学习如何创建自定义 ttk 样式:http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/ttk-style-layer.html
代码如下:
self.style = ttk.Style()
self.style.configure("ciao.TLabel", bg="red")
poplabel = ttk.Label(self.root, text="ciao", style="ciao.TLabel")
poplabel.place(x=0, y=530)
问题在于标签样式仍然是默认样式,而不是“ciao.TLabel”。
【问题讨论】:
-
您使用的是什么操作系统? This 可能有助于回答您的问题。