Commit 834392af by BellCodeEditor

auto save

parent 85ff11f2
Showing with 16 additions and 16 deletions
......@@ -4,16 +4,22 @@ import tkinter
root = tkinter.Tk()
root.title("注册") # 设置窗口标题
root.geometry("400x320+500+300") # 设置窗口大小
def A():
c=e1.get()
print(" ",c)
d=e2.get()
print(" ",d)
e=e3.get()
print(" ",e)
# 输入框entry;用户输入框
e1 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=40) # 显示成明文形式
e1.place(x=140, y=80)
e1 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=40,) # 显示成明文形式
e1.place(x=100, y=80)
# 密码输入框,左上角坐标:x:140,y:140
e2 = tkinter.Entry(root,show="*",font=('宋体',14),bg="light blue",width=40) # 显示成明文形式
e2.place(x=140, y=140)
e2.place(x=100, y=140)
# 确认密码输入框,左上角坐标:x:140,y:200
e3 = tkinter.Entry(root,show="*",font=('宋体',14),bg="light green",width=40) # 显示成明文形式
e3.place(x=140, y=200)
e3.place(x=100, y=200)
# 注册界面上的文字标签
lab = tkinter.Label(root, text='您好!请填写注册信息', font=('宋体', 15),
......@@ -22,21 +28,15 @@ lab.place(x=0,y=0)
# 在输入框前展示文字标签:用户名:、密 码:、确认密码:
lab = tkinter.Label(root, text='用户名:', font=('宋体', 15),
fg="black",width=10, height=2)
lab.place(x=120,y=70)
lab.place(x=50,y=70)
lab = tkinter.Label(root, text='密码:', font=('宋体', 15),
fg="black",width=10, height=2)
lab.place(x=120,y=130)
lab.place(x=50,y=130)
lab = tkinter.Label(root, text='确认密码:', font=('宋体', 15),
fg="black",width=10, height=2)
lab.place(x=120,y=190)
button=tkinter.Button(root,text="提交",fg="blue",width=6,height=2,command=register)
lab.place(x=50,y=190)
button=tkinter.Button(root,text="提交",fg="blue",width=6,height=2,command=A)
button.place(x=120,y=260)
# 保持窗口监听,进入消息循环
def A():
c=e1.get()
print(" ",c)
d=e2.get()
print(" ",d)
e=e3.get()
print(" ",e)
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