Commit 521ec35e by BellCodeEditor

auto save

parent 0651e310
Showing with 41 additions and 0 deletions
import tkinter
def reg():
name = e1.get()
password = e2.get()
enpassword = e3.get()
print(name,password,enpassword)
# 建立窗口对象
root = tkinter.Tk()
root.title('register') # 设置窗口标题
root.geometry('400x320+500+300') # 设置窗口大小
root.resizable(width = False ,height = False) #设置窗口是否被拉伸
# 输入框
e1 = tkinter.Entry(root, show=None, font=14, bg='light grey', width=20)
e1.place(x=140, y=80)
e2 = tkinter.Entry(root, show='*', font=14, bg='light grey', width=20)
e2.place(x=140, y=140)
e3 = tkinter.Entry(root, show='*', font=14, bg='light grey', width=20)
e3.place(x=140, y=200)
# 文本标签
lab1 = tkinter.Label(root, text='Hello, please fill in the registration information ', font=('微软雅黑', 12),
fg='black', width=40, height=2, bg='green')
lab1.place(x=0, y=0)
lab2 = tkinter.Label(root, text='name:', font=('微软雅黑', 12), fg='red')
lab2.place(x=60, y=75)
lab3 = tkinter.Label(root, text='password:', font=('微软雅黑', 12), fg='red')
lab3.place(x=50, y=135)
lab3 = tkinter.Label(root, text='enpassword:', font=('微软雅黑', 12), fg='red')
lab3.place(x=30, y=195)
button = tkinter.Button(root, text='submit',
font=('微软雅黑', 12), fg='black', bg='lightgreen', width=10, command=reg)
button.place(x=150, y=250)
# 消息循环
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