It is very simple program.
import tkinter
tkinter.Button(None, text='button').pack()
tkinter.mainloop()
I expect this program shows me such as a below picture.
But it shows a below picture actually.
When it is resized on GUI it seems working well.
It didn't occur this problem in High Sierra.
My environment is following:
- macOS Mojave 10.14
- Python 3.7.0
Could you advice to me?
I found out same problem on here.
I guess there is a bug in Tk. I am on MacOS 10.14.3 If you maximize and minimize the tkinter window the text on the button appears, another solution that worked for me is
I have this problem with an app I wrote and froze with PyInstaller. It still works fine on PC and my Mac laptop that doesn't have Mojave, but on my desktop mac that recently updated to Mojave it has buttons without text, and some buttons are completely invisible until clicked on.
I found an easy solution on Reddit: just resize the window slightly, and the interface elements appear!
Link to Reddit thread
I had this same exact error, and to get it fixed I had to change my buttons to
ttk.Button
and set a style. For example, add the following to import:And then after the root init:
Then when you are instantiating the Button:
It worked perfectly to ensure that the text is displayed properly. Before I added the ttk bit, I was in the same boat as you in Mojave.
For me it worked to update python to 3.5.6 from 3.5.4.
Here's an example that patches up the problem for me (at least until the Python/Tkinter stuff gets cleaned up):
This was tested on macOS Version 10.14.2 (18C54) and Python 3.7.2 (loaded via Home-brew).
I also had this problem, 100% reproducible on my Mac after upgrading to Mojave and when using Homebrew's python3.
Switching to Python.org 's Python 3.7.1 package download totally eliminated the problem for me.