I created a simple window with tkinter, with a title and a label. The title seems to be working, but the label won’t show up no matter what I do. I tried it with and without specifying a font. I’m using Python 3.12.3 and I’m on MacOS Ventura 13.3.
Here’s the code and the resulting (blank) UI below it:
import tkinter as tk
root = tk.Tk()
root.geometry("300x300")
root.title("Pass Stat")
label = tk.Label(root, text="Hello World!")
label.pack(padx=12, pady=12)
root.mainloop()
Resulting window
I tried this code as written above, with tkinter’s default text font on the label, and with no font specification at all.
jchurch828 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.