Why Does Adding a Command to Tkinter Button Cause the Window to be Covered Up?

I’m working on a python application using tkinter and after much time searching and trying to figure out what everything does, I’ve got a start to a program that works great. Until I add a command. The issue is once I add a command to withdraw the active window and reveal another, the window is covered with a whole bunch of black.

Repl link:

The code in question is this button and function.

playButton = tk.Button(mainFrame, text = "Play", width = 10, command = openWindow(mainWindow,playWindow))
def openWindow(currentWindow,newWindow):

Never mind, I switched my focus to other parts of my project and somehow, without any changes to the code causing the problem, I no longer have this problem.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.