代码
from tkinter import *
def run1():
s = "\n"+inp1.get()+inp2.get()+inp3.get()
txt.insert(END, s) # 追加显示运算结果
inp1.delete(0, END)
inp2.delete(0, END)
inp3.delete(0, END)# 清空输入
root = Tk()
root.geometry('240x240')
root.title('tk')
lb = Label(root)
lb.pack()
lb1 = Label(root, text='请输入姓名')
lb1.place(relx=0.2, rely=0.1, relwidth=0.6, relheight=0.1)
inp1 = Entry(root)
inp1.place(relx=0.2, rely=0.2, relwidth=0.6, relheight=0.1)
lb2 = Label(root, text='选择检测方式')
lb2.place(relx=0.2, rely=0.3, relwidth=0.6, relheight=0.1)
inp2 = Entry(root)
inp2.place(relx=0.2, rely=0.4, relwidth=0.6, relheight=0.1)
lb3 = Label(root, text='选择检测结果')
lb3.place(relx=0.2, rely=0.5, relwidth=0.6, relheight=0.1)
inp3 = Entry(root)
inp3.place(relx=0.2, rely=0.6, relwidth=0.6, relheight=0.1)
btn1 = Button(root, text='登记', command=run1)
btn1.place(relx=0.2, rely=0.7, relwidth=0.6, relheight=0.1)
txt = Text(root)
txt.place(rely=0.8, relheight=0.6)
root.mainloop()
结果图: