I need some help..
I want to make a python program that uses tkinter to show a message box. When the message box is closed once, i want to make 2 boxes appear. If the 2 boxes get closed i want 4 boxes to appear and so on...
I got the first message box to appear. If you close it a for loop wil start and activate the function that opens the new message boxes. Sadly it only opens 1 at a time, because I don't really know how to activate a function more than once at the same time.
Here is my code:
import tkinter as tk
from tkinter import messagebox
root = tk.Tk()
x = 5
def open():
messagebox.showwarning("Dragons..", "Cut off 1 head of the dragon and 2 more will appear..")
def on_closing():
if messagebox.showwarning("Dragons..", "Cut off 1 head of the dragon and 2 more will appear.."):
for i in range(x):
open()
else:
root.destroy()
on_closing()
Can someone give me a push in the right direction?
kind regards,
Sleek