如何解决python中的Tkinter问题?

巴拉贾维什

当我尝试在 python 中使用 python 或 tkinter 制作 youtube 下载器时遇到问题。

代码是:

path_style=ttk.Style
path_style.configure("PT.TButton",background="DarkOrange1",foreground="DarkOrange1", font = ("bahnschrift SewiBold",10))   

错误是:

Traceback (most recent call last):
  File "C:\Users\baraa\PycharmProjects\pythonProject1\folder\baraa.py", line 33, in <module>
    path_style.configure("PT.TButton",background="DarkOrange1",foreground="DarkOrange1",
TypeError: configure() missing 1 required positional argument: 'style'
点击轻弹

您是否尝试过使用括号像这样实例化样式类:

path_style=ttk.Style()

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章