def lock():
global pas,lk
lk=Tk.Frame(main)
lk.pack(fill="both", anchor="center", expand=1)
Tk.Label(lk, text="", font="arial 75").pack(anchor="center", side="top")
fpas=Tk.LabelFrame(lk, text="Zadejte heslo:")
fpas.pack(anchor="center")
pas=Tk.Entry(fpas)
pas.pack()
Tk.Button(lk, text="OK", command=check).pack(side="top")
Tk.Button(lk, text="Vypnout", command=lkend).pack(side="top")
return
这是我代码的一部分,我想更改它。当我将密码写入名为Tk.Entry
的pas
时,我不想看到数字,而只想看到一个特定的符号,比如*或其他符号。谢谢你的回答。在
注:请不要评估我的代码,我知道我可以写得更好,但我只要求如何隐藏密码,而不是我的技巧:-D
只需使用
Entry
小部件的show
选项:相关问题 更多 >
编程相关推荐