【发布时间】:2021-10-27 07:53:04
【问题描述】:
我想更新 PySimpleGUI 窗口的属性no_titlebar。
我想要的是,当我们点击按钮时,最初有标题栏的窗口应该没有标题栏。
有什么方法可以实现吗?
from PySimpleGUI import *
lt=[[Button("No Layout")]]
wn=Window("Test",lt,no_titlebar=False)
while True:
e,v=wn.read()
if e=="No Layout":
wn.Update(no_titlebar=True)
else:
break
我试过了,但得到了一个 AttributeError
AttributeError: 'Window' object has no attribute 'Update'
【问题讨论】:
-
是的,你得到了答案
'Window' object has no attribute 'Update'。
标签: python pysimplegui