Commit 84b6d25e by BellCodeEditor

auto save

parent 3a0e188c
Showing with 5 additions and 6 deletions
...@@ -5,7 +5,9 @@ root = tkinter.Tk() ...@@ -5,7 +5,9 @@ root = tkinter.Tk()
root.title("注册") # 设置窗口标题 root.title("注册") # 设置窗口标题
root.geometry("400x320+500+300") # 设置窗口大小 root.geometry("400x320+500+300") # 设置窗口大小
root.resizable(width=False,height=False) root.resizable(width=False,height=False)
def a():
print("用户名:"+e1.get())
print("密码:"+e2.get())
# 输入框entry;用户输入框 # 输入框entry;用户输入框
e1 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=18) # 显示成明文形式 e1 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=18) # 显示成明文形式
e1.place(x=140, y=80) e1.place(x=140, y=80)
...@@ -15,7 +17,6 @@ e2.place(x=140, y=140) ...@@ -15,7 +17,6 @@ e2.place(x=140, y=140)
# 确认密码输入框,左上角坐标:x:140,y:200 # 确认密码输入框,左上角坐标:x:140,y:200
e3 = tkinter.Entry(root,show="*",font=('宋体',14),bg="white",width=18) # 显示成明文形式 e3 = tkinter.Entry(root,show="*",font=('宋体',14),bg="white",width=18) # 显示成明文形式
e3.place(x=140, y=200) e3.place(x=140, y=200)
# 注册界面上的文字标签 # 注册界面上的文字标签
lab = tkinter.Label(root, text='您好!请填写注册信息', font=('宋体', 15), lab = tkinter.Label(root, text='您好!请填写注册信息', font=('宋体', 15),
fg="black",width=40, height=2,bg="green") fg="black",width=40, height=2,bg="green")
...@@ -27,10 +28,7 @@ l2=tkinter.Label(root,text="密码:",font=("宋体",14),fg="black") ...@@ -27,10 +28,7 @@ l2=tkinter.Label(root,text="密码:",font=("宋体",14),fg="black")
l2.place(x=80,y=140) l2.place(x=80,y=140)
l3=tkinter.Label(root,text="确认密码:",font=("宋体",14),fg="black") l3=tkinter.Label(root,text="确认密码:",font=("宋体",14),fg="black")
l3.place(x=40,y=200) l3.place(x=40,y=200)
def a():
print("用户名:"+e1.get())
print("密码:"+e2.get())
butt=tkinter.Button(root,text="提交",font=("宋体",14),bg="light grey",width=10,command=a) butt=tkinter.Button(root,text="提交",font=("宋体",14),bg="light grey",width=10,command=a)
butt.place(x=150,y=250) butt.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