I am in Python and I am using EasyGUI. I want to know how to keep a easygui.buttonbox window open after you click a button.
Here is my code:
def Money():
global budget #Not important
run = 1
while run == 1:
money = easygui.buttonbox("$" + str(budget),
choices = ['Money', 'Leave'])
if money == "Money":
budget = budget + 0.01
if money == "Leave":
run = 0
I would appreciate it if you would answer if you know how to do this.
Thanks!
EasyGUI is not event driven. This means it doesn't sit there waiting for events to happen, and then triggering some response. So the buttonbox will only stay open until it is used. It is synchronous, blocking.
From the documentation:
EasyGUI is different from other GUI generators in that EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls.
You probably need something else.