diff --git a/my_window.py b/my_window.py index 6140282..bc4f5f6 100644 --- a/my_window.py +++ b/my_window.py @@ -1,9 +1,16 @@ import tkinter +def register(): + name=e1.get() + pd1 = e2.get() + pd2 = e3.get() + print("提交",name,pd1,pd2) root = tkinter.Tk() root.title("注册") +root.resizable(width=False,height=False) root.geometry("400x320+500+400") e1 = tkinter.Entry(root,show=None,font=("宋体",14),bg="light grey",width=18) +content=e1.get() e1.place(x=140,y=80) e2 = tkinter.Entry(root,show="*",font=("宋体",14),bg="light grey",width=18) e2.place(x=140,y=140) @@ -17,7 +24,8 @@ l2 = tkinter.Label(root,text="密码",font=("宋体",14),fg="red",width=5) l2.place(x=60,y=140) l3 = tkinter.Label(root,text="确认密码",font=("宋体",14),fg="red",width=7) l3.place(x=60,y=200) - +button1 = tkinter.Button(root,text="提交",bg="lightgreen",width=15,command=register) +button1.place(x=150,y=250)