From 24f054293037638e1883d986b4aa4ed3209b3725 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 30 Jul 2022 20:41:32 +0800 Subject: [PATCH] save project --- my_window.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 my_window.py diff --git a/my_window.py b/my_window.py new file mode 100644 index 0000000..608689b --- /dev/null +++ b/my_window.py @@ -0,0 +1,44 @@ +import tkinter + +# 建立窗口对象 +root = tkinter.Tk() +root.title("注册") # 设置窗口标题 +root.geometry("400x320+500+300") # 设置窗口大小 +def empty(): + name1=e1.get() + print("用户提交了") + print("用户名:"+name1) + name2=e2.get() + print("密码:"+name2) + name3=e3.get() + print("确认密码:"+name3) + def full(): + with open() + +# 输入框entry;用户输入框 +e1 = tkinter.Entry(root,show=None,font=('宋体',14),bg="light green",width=18) # 显示成明文形式 +e1.place(x=140, y=80) +# 密码输入框,左上角坐标:x:140,y:140 +e2=tkinter.Entry(root,show=None,font=("宋体",14),bg="Light blue",width=18) +e2.place(x=140,y=140) +# 确认密码输入框,左上角坐标:x:140,y:200 +e3=tkinter.Entry(root,show=None,font=("宋体",14),bg="Light pink",width=18) +e3.place(x=140,y=200) + +# 注册界面上的文字标签 +lab = tkinter.Label(root, text='您好!请填写注册信息', font=('宋体', 15), + fg="black",width=40, height=2,bg="white") +lab.place(x=0,y=0) +# 在输入框前展示文字标签:用户名:、密 码:、确认密码: +l=tkinter.Label(root,text="用户名:",font=("宋体",14),fg="red",width=8) +l.place(x=50,y=80) +l1=tkinter.Label(root,text="密码:",font=("宋体",14),fg="red",width=8) +l1.place(x=50,y=140) +l1=tkinter.Label(root,text="确认密码:",font=("宋体",14),fg="red",width=8) +l1.place(x=50,y=200) +root.resizable(width=False,height=False) +t1=tkinter.Button(text="提交",bg="Light green",width=10,command=empty) +t1.place(x=150,y=250) + +# 保持窗口监听,进入消息循环 +root.mainloop() -- libgit2 0.25.0