I am making an os simulation, called NutShellOs.
When I click the taskbar icon, it should rebound, just like a normal OS. However, when I click it, it works the first time, but then after that, it just rebounds.
Here is my code:
def clicked_on_text_editor(event = "<Button-1>"):
Text1.withdraw()
#Port.coords(text_editor_logo_on_port, 55, Desktop.winfo_screenheight() + (0.1 * (0.1 * Desktop.winfo_screenheight())), 105, Desktop.winfo_screenheight())
def clicked_again(event = "<Button-1>"):
#Port.coords(text_editor_logo_on_port, 55, 0, 105, (0.1 * Desktop.winfo_screenheight()))
Text1.deiconify()
Port.bind("<Button-1>", clicked_again)
Port.bind("<Button-1>", clicked_on_text_editor)
This is not the entire code, by the way.
clicked_again
is being called? Are you certain thatText1
is what you think it is?Text1
is, or whatPort
is, and the indentation is broken.