First of all this is my code:
button_1 = Button(
image=button_image_1,
borderwidth=0,
highlightthickness=0,
command=lambda:[get_to_main_when_clicked(),delete_red_border()],
relief="flat"
)
As you can see I binded 2 functions to this button. To the first one: If a specific condition is true, then the function lets an image appear. The second one then should wait 3 seconds and should delete the appeared image. The only really weird problem is, that it no matter what I do, first executes the delete_red_border() function. It waits 3 seconds, then its trying to delete an image that couldn't be defined and globalized, because the get_to_main_when_clicked() function wasn't executed. How can I solve this? PS: The specific condition is true.
get_to_main_when_clicked()
function, and at the end ofget_to_main_when_clicked()
you can useafter(3000, delete_red_border)
– BrianZhanglambda
creates a list, the first item is evaluated first. I guess the problem is somewhere else ... – Maurice Meyer