我正在制作一个比赛软件,我想让它这样当我按回车键,另一个进入窗口出现,这是我的代码
from tkinter import*
import time
import sys
master = Tk()
master.title('Tournament Software')
master.geometry("800x800")
master.configure(background="black")
def end():
master.destroy()
def click1():
master.destroy()
master1 = Tk()
master1.title("Tournament Software")
master1.geometry("800x800")
master1.configure(background="black")
la=Label(master1, text="Enter Contestant Names:",font="none 50 bold", fg="white", bg="black").pack()
#I don't know what to put here
e=Entry(master1, bd=10,width=50).pack()
l=Label(master, text="Tournament Software", font="none 50 bold", bg="black", fg="white").pack()
b=Button(master, text="Start",font="none 50 bold",command = click1).pack(side=LEFT)
b1=Button(master, text="Quit",font="none 55 bold",command = end).pack(side=RIGHT)
mainloop()
下面的代码在每次按下Enter时生成一个新的entry小部件:
相关问题 更多 >
编程相关推荐