Commit 2572b504 by BellCodeEditor

save project

parent 18f15805
Showing with 8 additions and 10 deletions
import tkinter as tk import tkinter as tk
root2 = tk.Tk()
root2.title()
root2.geometry("200x50")
lab0 = tk.Label(root2,text='密码不符,请检查',font=('宋体',15),fg="red",width=20,height=2)
lab0.place(x=0,y=0)
def a(): def a():
name=get(e1) name=e1.get()
if (get(e2)==get(e3)): if (e2.get()==e3.get()):
Key=get(e2) Key=e2.get()
print("注册用户名:",name)
print("注册密码:",Key)
else: else:
root2.mainloop() print("密码不相符,请检查")
root = tk.Tk() root = tk.Tk()
root.title() root.title()
root.geometry("400x300+500+300") root.geometry("400x300+500+300")
...@@ -28,5 +25,5 @@ lab2.place(x=30,y=130) ...@@ -28,5 +25,5 @@ lab2.place(x=30,y=130)
lab3 = tk.Label(root,text='确认密码:',font=('宋体',15),fg="red",width=10,height=2) lab3 = tk.Label(root,text='确认密码:',font=('宋体',15),fg="red",width=10,height=2)
lab3.place(x=30,y=190) lab3.place(x=30,y=190)
button=tk.Button(root,text='确定',font=('宋体',15),bg="lightgreen",width=15,command=a) button=tk.Button(root,text='确定',font=('宋体',15),bg="lightgreen",width=15,command=a)
button.place(x=50,y=250) button.place(x=150,y=250)
root.mainloop() root.mainloop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment