Tkinter buttons not showing text on my mac, although code works on others computers Tkinter buttons not showing text on my mac, although code works on others computers tkinter tkinter

Tkinter buttons not showing text on my mac, although code works on others computers


Here is solution to add this line from tkinter import ttk.

and than use ttk. everywhere you plain to use Button, Label, Entry, etc.:

ttk.Button(text="Login", width="30", command = login).pack()

Here is code so you can try it.

def main_screen():  from tkinter import ttk  global screen  screen = Tk()  screen.geometry("500x500")  screen.title("4rManager")  Label(text="Login/Register", font=("Calibri", 13)).pack()  ttk.Label(text="").pack()  ttk.Button(text="Login").pack()  ttk.Label(text="").pack()  ttk.Button(text="Register").pack()  screen.mainloop()main_screen()

Hope I helped.


Updating doesn't work for everyone, I've read several posts of those for whom it didn't, and it didn't for me.

But since resizing the window works, there must be something that the tk instance does when resizing that makes everything appear again.

So you might check what happens there, and use that if your program detects if the OS is Mojave. Obviously this is not production worthy and only a fix for your own local projects or maybe some course project, but at least it's something.