Commit c650e551 by BellCodeEditor

save project

parent 307ac72d
Showing with 57 additions and 0 deletions
w=tkinter.Tk()
w.title("注册")
w.geometry("600x500+400+200")
e=tkinter.Entry(w,show=None,font=('楷体',14),bg='light grey',width=28)
e.place(x=200,y=180)
r=tkinter.Entry(w,show='1',font=('楷体',14),bg='light grey',width=28)
r.place(x=200,y=220)
t=tkinter.Entry(w,show='3',font=('楷体',14),bg='light grey',width=28)
t.place(x=200,y=260)
w.mainloop()
\ No newline at end of file
import tkinter
def h():
n=e.get()
m=r.get()
y=t.get()
print('输入的用户名为',n)
print('输入的密码为',m)
print('确认密码为',y)
# 建立窗口对象
w=tkinter.Tk()
w.title("注册")
w.geometry("600x500+400+200")
w.resizable(width=False,height=False)
e=tkinter.Entry(w,show=None,font=('楷体',14),bg='light grey',width=28)
e.place(x=200,y=140)
r=tkinter.Entry(w,show='3',font=('楷体',14),bg='light grey',width=28)
r.place(x=200,y=220)
t=tkinter.Entry(w,show='3',font=('楷体',14),bg='light grey',width=28)
t.place(x=200,y=300)
# 注册界面上的文字标签
lab1 = tkinter.Label(w, text='您好!请填写注册信息', font=('楷体', 15),
fg="black",width=60, height=2,bg="sky blue")
lab1.place(x=0,y=0)
# 在输入框前展示文字标签:用户名:、密 码:、确认密码:
lab = tkinter.Label(w, text='用户名:', font=('楷体', 10),
fg="black")
lab.place(x=130,y=140)
la = tkinter.Label(w, text='密 码:', font=('楷体', 10),
fg="black")
la.place(x=130,y=220)
l = tkinter.Label(w, text='确认密码:', font=('楷体', 10),
fg="black")
l.place(x=130,y=300)
button=tkinter.Button(w,text='提交', font=('楷体', 14),bg="lightgreen",width=10,command=h)
button.place(x=260,y=400)
# 保持窗口监听,进入消息循环
w.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