标签:OWIN def else orm 密码 for gui 失败 info
代码演示:
import tkinter as tk from tkinter import messagebox as msgbox def LoginFun(): sPass=enPass.get() if(sPass=="htzd"): labTip.config(text="登录成功。密码是:{}".format(sPass)) msgbox.showinfo("温馨提示","登录成功.") else: labTip.config(text="登录失败。密码是:{}".format(sPass)) msgbox.showerror("温馨提示","登录失败.") w=tk.Tk() w.title("登录演示") w.geometry("400x300") labTip=tk.Label(w,text="Hello!") labTip.pack() enPass=tk.Entry(w) enPass.pack() btnLogin=tk.Button(w,text="登录",command=LoginFun) btnLogin.pack() w.mainloop()
标签:OWIN def else orm 密码 for gui 失败 info
原文地址:https://www.cnblogs.com/exesoft/p/12936372.html