Commit 5d5fac6c by BellCodeEditor

auto save

parent 0651e310
Showing with 32 additions and 1 deletions
import tkinter import tkinter
def register():
name = c.get()
password1 = d.get()
password2 = e.get()
print("用户输入的信息为:",name,password1,password2)
root=tkinter.Tk()
screenwidth = root.winfo_screenwidth()
screenheight = root.winfo_screenheight()
a=(screenwidth-300)/2
b=(screenheight-300)/2
print(300*300+a+b)
print(screenwidth,screenheight)
root.title("window")
root.geometry("%dx%d+%d+%d" %(400,320,a,b))
root.resizable(width=False,height=False)
c=tkinter.Entry(root,show=None,font=("宋体",14),width=18)
c.place(x=130,y=60)
d=tkinter.Entry(root,show="*",font=("宋体",14),width=18)
d.place(x=130,y=100)
e=tkinter.Entry(root,show="*",font=("宋体",14),width=18)
e.place(x=130,y=140)
f=tkinter.Label(root,text="您好!请填写注册信息",font=("宋体",15),fg="red")
f.place(x=0,y=0)
g=tkinter.Label(root,text="账号 :",font=("宋体",14))
g.place(x=50,y=60)
h=tkinter.Label(root,text="密码 :",font=("宋体",14))
h.place(x=50,y=100)
i=tkinter.Label(root,text="确认密码:",font=("宋体",14))
i.place(x=30,y=140)
j=tkinter.Button(root,text="提交",font=("宋体",17),bg="red",command=register)
j.place(x=180,y=200)
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