Commit 92defae2 by BellCodeEditor

save project

parent 0651e310
Showing with 31 additions and 0 deletions
import tkinter
def reg():
name=a1.get()
password=a2.get())
if password != password2:
print('密码前后不一致!')
else:
print('提交的用户名是:',name)
print('密码为:',password)
root = tkinter.Tk()#建立窗口
root.title('注册')#设置标题
root.geometry("400x320+500+300")#设置窗口大小
root.resizable(width=False,height=False)
a1 = tkinter.Entry(root,show=None,font=('宋体',14),bg='light grey',width=18)
a1.place(x=140,y=80)
a2 = tkinter.Entry(root,show=None,font=('宋体',14),bg='light grey',width=18)
a2.place(x=140,y=140)
a3 = tkinter.Entry(root,show=None,font=('宋体',14),bg='light grey',width=18)
a3.place(x=140,y=200)
l=tkinter.Label(root,text='您好,请填写注册信息',font=('宋体',15),width=40,height=2,bg='grey')
l.place(x=0,y=0)
l1=tkinter.Label(root,text='用户名',font=('宋体',15),width=6,height=2)
l1.place(x=70,y=67)
l2=tkinter.Label(root,text='密码',font=('宋体',15),width=6,height=2)
l2.place(x=70,y=127)
l3=tkinter.Label(root,text='确认密码',font=('宋体',15),width=8,height=2)
l3.place(x=54,y=187)
q=tkinter.Button(root,text='提交',bg='green',width=15,command=reg)
q.place(x=150,y=250)
root.mainloop()#保持窗口监听(永远在末尾)
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