组件描述
Entry组件为输入框。
程序实现
代码(1)
import tkinter as tk
root = tk.Tk()
# 设置标签信息
label1 = tk.Label(root, text='战队名称:')
label1.grid(row=0, column=0)
label2 = tk.Label(root, text='选手名字:')
label2.grid(row=1, column=0)
# 创建输入框
entry1 = tk.Entry(root)
entry1.grid(row=0, column=1, padx=10, pady=5)
entry2 = tk.Entry(root)
entry2.grid(row=1,