【发布时间】:2022-12-04 10:38:13
【问题描述】:
我正在研究密码管理器并且具有这样的结构:
def popUp(text):
answer = simpledialocusg.askstring("input string", text)
return answer
它工作得很好,但我想使用 Custom Tkinter 使弹出窗口看起来更好。当我做
def popUp(text):
answer = customtkinter.CTkInputDialog("input string", text)
return answer
我收到一个错误:
AttributeError: 'CTkInputDialog' object has no attribute 'encode'
期望弹出窗口正常工作
【问题讨论】:
-
运行代码时无法重现上述异常。最好提供一个minimal reproducible example。还建议查看CTkInputDialog 上官方文档中的示例。
标签: python tkinter customtkinter