I've encountered an issue with my code, which works on other computers but not on my Mac running Python 3.9 on PyCharm. The Label
and Entry
widgets are not displaying on the window, though the Button
, window title, and window size are working as expected.
Here is the code:
from tkinter import *
window = Tk()
window.title("GUI Programme")
window.minsize(width=500, height=300)
label = Label(text="This is a label")
label.pack()
entry = Entry(width=10)
entry.pack()
button = Button(text="This is a button")
button.pack()
window.mainloop()
I'm not sure what the issue here is, and any help or guidance would be greatly appreciated. Thanks in advance!