I have been working with tkinter-buttons for a few days. I'm trying to add a terminator button that will terminate the program when you press the Tkinter button. But as soon as the button is displayed (only displayed on the display) on the screen, the program stops, it is like it is not continued like it is paused, it does not run or shows anything in output.
Here's my .py file.
tkWindow = Tk()
tkWindow.geometry('150x50')
tkWindow.title('Tkinter Example')
tkWindow.attributes('-topmost', True)
class Launch:
button = Button(tkWindow,
text='Terminate',
command=exit)
button.pack()
tkWindow.mainloop()
while 1:
ui.RunGameDesign()
upcomingOperation = design.loadingTheUpcomingExecution(ui.design, ui.vs)
ui.ProcessOperation(upcomingOperation)