In Mac OS, the tkinter message boxes do NOT show different icons for different types of message box (other than warning). The error, info, and question icons are all the "Python Spaceship" icon and not specific to errors, info, or questions. See attached files starting with "Screen Shot ..."
In Windows, the message boxes show context sensitive icons. See attached file WindowsMessageBoxOutput.jpg
How do I get the context sensitive icons to load on Mac OS?
The code I used for generating/showing the message boxes is the following:
import tkinter as tk
import tkinter.messagebox as tkmb
from tkinter import Button
def show_message_boxes():
tkmb.showinfo(title='Info Box', message='Info with info icon', icon='info')
tkmb.showinfo(title='Info Box', message='Info with error icon', icon='error')
tkmb.showinfo(title='Info Box', message='Info with question icon', icon='question')
tkmb.showinfo(title='Info Box', message='Info with warning icon', icon='warning')
tkmb.showinfo(title='Info Box', message='Info box with info icon', icon='info')
tkmb.showerror(title='Error Box', message='Error box with default icon', icon='error')
tkmb.showwarning(title='Warning Box', message='Warning box with default icon', icon='warning')
tkmb.showinfo(title='Info Box', message='Info box with default icon')
tkmb.showerror(title='Error Box', message='Error box with default icon')
tkmb.showwarning(title='Warning Box', message='Warning box with default icon')
window = tk.Tk()
but = Button(window, text ='Click', command = show_message_boxes, width=20, height=10)
but.grid(row=0, column=0)
window.mainloop()
Note: I tried various options to try and generate message boxes with icons (hence the various calls in the code above).
Environment
I'm running with the following on Mac OS:
- Mojave 10.14.6
- Python 3.7.5
- tkinter 8.5
Images: