Commit c3cf5ebf by BellCodeEditor

save project

parent 6949616c
Showing with 38 additions and 16 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 import tkinter
# 建立窗口对象 # 建立窗口对象
root = tkinter.Tk() w=tkinter.Tk()
root.title("注册") # 设置窗口标题 w.title("注册")
root.geometry("400x320+500+300") # 设置窗口大小 w.geometry("600x500+400+200")
# 输入框entry;用户输入框 e=tkinter.Entry(w,show=None,font=('楷体',14),bg='light grey',width=28)
e1 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light grey",width=18) # 显示成明文形式 e.place(x=200,y=140)
e1.place(x=140, y=80)
# 密码输入框,左上角坐标:x:140,y:140 r=tkinter.Entry(w,show='1',font=('楷体',14),bg='light grey',width=28)
? r.place(x=200,y=220)
# 确认密码输入框,左上角坐标:x:140,y:200
? t=tkinter.Entry(w,show='3',font=('楷体',14),bg='light grey',width=28)
t.place(x=200,y=300)
# 注册界面上的文字标签 # 注册界面上的文字标签
lab = tkinter.Label(root, text='您好!请填写注册信息', font=('宋体', 15), lab1 = tkinter.Label(w, text='您好!请填写注册信息', font=('楷体', 15),
fg="black",width=40, height=2,bg="green") fg="black",width=60, height=2,bg="sky blue")
lab.place(x=0,y=0) 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)
# 保持窗口监听,进入消息循环 # 保持窗口监听,进入消息循环
root.mainloop() 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