Commit 1c66ef56 by BellCodeEditor

save project

parent d39a661d
Showing with 11 additions and 3 deletions
import tkinter import tkinter
def zhuce():
name = e1.get()
print("用户名的用户名为:",name)
# 建立窗口对象 # 建立窗口对象
root = tkinter.Tk() root = tkinter.Tk()
...@@ -6,13 +10,13 @@ root.title("注册") # 设置窗口标题 ...@@ -6,13 +10,13 @@ root.title("注册") # 设置窗口标题
root.geometry("400x320+500+300") # 设置窗口大小 root.geometry("400x320+500+300") # 设置窗口大小
# 输入框entry;用户输入框 # 输入框entry;用户输入框
e1 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=18) # 显示成明文形式 e1 = tkinter.Entry(root,show="*",font=('宋体',14),bg="light grey",width=18) # 显示成明文形式
e1.place(x=140, y=80) e1.place(x=140, y=80)
# 密码输入框,左上角坐标:x:140,y:140 # 密码输入框,左上角坐标:x:140,y:140
e2 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=18) # 显示成明文形式 e2 = tkinter.Entry(root,show="*",font=('宋体',14),bg="light grey",width=18) # 显示成明文形式
e2.place(x=140, y=140) e2.place(x=140, y=140)
# 确认密码输入框,左上角坐标:x:140,y:200 # 确认密码输入框,左上角坐标:x:140,y:200
e3 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=18) # 显示成明文形式 e3 = tkinter.Entry(root,show="*",font=('宋体',14),bg="light grey",width=18) # 显示成明文形式
e3.place(x=140, y=200) e3.place(x=140, y=200)
# 注册界面上的文字标签 # 注册界面上的文字标签
...@@ -28,5 +32,9 @@ l2.place(x = 30,y = 140) ...@@ -28,5 +32,9 @@ l2.place(x = 30,y = 140)
l3 = tkinter.Label(root,text = "确认密码:",font = ("宋体",14),fg = "red",width = 10) l3 = tkinter.Label(root,text = "确认密码:",font = ("宋体",14),fg = "red",width = 10)
l3.place(x = 30,y = 200) l3.place(x = 30,y = 200)
button = tkinter.Button(root,text = "提交",show = None,bg = "green",width = 18)
button.place(x = 140,y = 250)
conten = e1.get
# 保持窗口监听,进入消息循环 # 保持窗口监听,进入消息循环
root.mainloop() 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